提交
This commit is contained in:
parent
22f7405aaa
commit
afcaf8b201
@ -30,9 +30,9 @@ spring:
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
url: jdbc:mysql://ordinary.jimostudio.link:26449/prepare_food?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
|
||||
url: jdbc:mysql://xunyingcloud.cn:23306/prepare_food?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: minxianrui
|
||||
password: x6dbfGN4s6YjcX8P
|
||||
minimum-idle: 1
|
||||
maximum-pool-size: 10
|
||||
idle-timeout: 600000
|
||||
|
@ -13,7 +13,7 @@ public class CategoryConstants {
|
||||
|
||||
/** 分类类型-产品分类 */
|
||||
public static final Integer CATEGORY_TYPE_PRODUCT = 1;
|
||||
/** 分类类型-附件分类 */
|
||||
/** 分类类型-套餐分类 */
|
||||
public static final Integer CATEGORY_TYPE_ATTACHMENT = 2;
|
||||
/** 分类类型-文章分类 */
|
||||
public static final Integer CATEGORY_TYPE_ARTICLE = 3;
|
||||
|
@ -246,6 +246,10 @@ public class Constants {
|
||||
public static final String PRODUCT_TYPE_FRUIT_EXCHANGE_STR= "茶果兑换";
|
||||
public static final Integer PRODUCT_TYPE_GROUP = 0;
|
||||
|
||||
// 楼层渠道
|
||||
public static final Integer HOME_TYPE_1 = 1;
|
||||
public static final Integer HOME_TYPE_2 = 2;
|
||||
|
||||
//group gid
|
||||
public static final Integer GROUP_DATA_ID_INDEX_BEST_BANNER = 37; //中部推荐banner图
|
||||
public static final Integer GROUP_DATA_ID_INDEX_BANNER = 48; //首页banner滚动图
|
||||
|
@ -1,121 +0,0 @@
|
||||
package com.zbkj.common.model.activity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@TableName("eb_activity")
|
||||
public class Activity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 活动管理ID
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 分类
|
||||
*/
|
||||
private String cid;
|
||||
/**
|
||||
* 活动标题
|
||||
*/
|
||||
private String title;
|
||||
/**
|
||||
* 活动作者
|
||||
*/
|
||||
private String author;
|
||||
/**
|
||||
* 活动图片
|
||||
*/
|
||||
private String imageInput;
|
||||
/**
|
||||
* 活动简介
|
||||
*/
|
||||
private String synopsis;
|
||||
/**
|
||||
* 活动分享标题
|
||||
*/
|
||||
private String shareTitle;
|
||||
/**
|
||||
* 活动分享简介
|
||||
*/
|
||||
private String shareSynopsis;
|
||||
/**
|
||||
* 浏览次数
|
||||
*/
|
||||
private String visit;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Boolean status;
|
||||
|
||||
/**
|
||||
* 活动地址
|
||||
*/
|
||||
private String activityAddr;
|
||||
/**
|
||||
* 活动时间
|
||||
*/
|
||||
private Date activityTime;
|
||||
/**
|
||||
* 活动人数
|
||||
*/
|
||||
private Integer activityNum;
|
||||
/**
|
||||
* 费用
|
||||
*/
|
||||
private BigDecimal activityPrice;
|
||||
/**
|
||||
* 标签
|
||||
*/
|
||||
private String tags;
|
||||
/**
|
||||
* 是否隐藏
|
||||
*/
|
||||
private Integer hide;
|
||||
/**
|
||||
* 是否热门(小程序)
|
||||
*/
|
||||
private Integer isHot;
|
||||
/**
|
||||
* 是否轮播(小程序)
|
||||
*/
|
||||
private Integer isBanner;
|
||||
/**
|
||||
* 活动内容
|
||||
*/
|
||||
private String content;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private Date beginTime;
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private Date endTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer flag;
|
||||
|
||||
}
|
@ -1,91 +0,0 @@
|
||||
package com.zbkj.common.model.activity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@TableName("eb_activity_register")
|
||||
public class ActivityRegister implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 活动id
|
||||
*/
|
||||
private Long activityId;
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Integer uid;
|
||||
/**
|
||||
* 隐藏状态:0显示,1隐藏
|
||||
*/
|
||||
private Boolean isShow;
|
||||
/**
|
||||
* 联系人姓名
|
||||
*/
|
||||
private String userName;
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
private String cellPhone;
|
||||
/**
|
||||
* 参加人数
|
||||
*/
|
||||
private Integer attendNum;
|
||||
/**
|
||||
* 报名时间
|
||||
*/
|
||||
private Date registerDate;
|
||||
/**
|
||||
* 状态【0:报名待确认,1:报名成功,2:已拒绝,3:取消待确认,4已取消】
|
||||
*/
|
||||
private Integer registerStatus;
|
||||
/**
|
||||
* 取消时间
|
||||
*/
|
||||
private Date cancelData;
|
||||
/**
|
||||
* 取消人
|
||||
*/
|
||||
private Long cancelUser;
|
||||
/**
|
||||
* 取消人姓名
|
||||
*/
|
||||
private String cancelUserName;
|
||||
/**
|
||||
* 取消原因类型
|
||||
*/
|
||||
private Integer cancelReasonType;
|
||||
/**
|
||||
* 取消原因类型时其他时,输入的具体原因
|
||||
*/
|
||||
private String cancelReason;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createDate;
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date changedDate;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String userAvatar;
|
||||
|
||||
}
|
@ -18,7 +18,6 @@ import lombok.experimental.Accessors;
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("eb_store_pink")
|
||||
@ApiModel(value="StorePink对象", description="拼团表")
|
||||
public class StorePink implements Serializable {
|
||||
|
||||
|
@ -0,0 +1,54 @@
|
||||
package com.zbkj.common.model.deliveryset;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName("eb_delivery_set_fee")
|
||||
public class DeliverySetFee implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@TableId
|
||||
private Integer id;
|
||||
/**
|
||||
* 首米
|
||||
*/
|
||||
private BigDecimal first;
|
||||
/**
|
||||
* 首米配送费
|
||||
*/
|
||||
private BigDecimal firstPrice;
|
||||
/**
|
||||
* 续米
|
||||
*/
|
||||
private BigDecimal renewal;
|
||||
/**
|
||||
* 续米配送费
|
||||
*/
|
||||
private BigDecimal renewalPrice;
|
||||
/**
|
||||
* 是否无效
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.zbkj.common.model.deliveryset;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName("eb_delivery_set_time")
|
||||
public class DeliverySetTime implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@TableId
|
||||
private Integer id;
|
||||
/**
|
||||
* 预约配送天数
|
||||
*/
|
||||
private Integer appointDay;
|
||||
/**
|
||||
* 上午配送时间(9点-12点)
|
||||
*/
|
||||
private String amSendHour;
|
||||
/**
|
||||
* 下午配送时间(15点-19点)
|
||||
*/
|
||||
private String pmSendHour;
|
||||
/**
|
||||
* 配送区间(分钟)
|
||||
*/
|
||||
private Integer sendSplit;
|
||||
/**
|
||||
* 1通用,2门店指定
|
||||
*/
|
||||
private Integer type;
|
||||
/**
|
||||
* 门店编号
|
||||
*/
|
||||
private Integer storeId;
|
||||
/**
|
||||
* 是否无效
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
}
|
@ -1,73 +0,0 @@
|
||||
package com.zbkj.common.model.game;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 游戏表 Entity 实体类
|
||||
|
||||
*/
|
||||
@Data
|
||||
@TableName("eb_game")
|
||||
public class Game implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 分类id
|
||||
*/
|
||||
private String cid;
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
private String image;
|
||||
/**
|
||||
* 游戏名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 游戏描述
|
||||
*/
|
||||
private String description;
|
||||
/**
|
||||
* 状态(0:关闭,1:开启)
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 是否删除(0:否,1:是)
|
||||
*/
|
||||
private Integer isDel;
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private Date beginTime;
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private Date endTime;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Object rule;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Object items;
|
||||
|
||||
}
|
@ -1,79 +0,0 @@
|
||||
package com.zbkj.common.model.game;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName("eb_game_prize_draw_item")
|
||||
public class GamePrizeDrawItem implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 游戏id
|
||||
*/
|
||||
private Integer gameId;
|
||||
/**
|
||||
* 商品
|
||||
*/
|
||||
private Integer productId;
|
||||
/**
|
||||
* 商品图
|
||||
*/
|
||||
private String productImage;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String productName;
|
||||
/**
|
||||
* 价值
|
||||
*/
|
||||
private Integer productPrice;
|
||||
/**
|
||||
* 价格比率(八五折:0.85)
|
||||
*/
|
||||
private BigDecimal productRate;
|
||||
/**
|
||||
* 中奖比率
|
||||
*/
|
||||
private BigDecimal lotteryRate;
|
||||
/**
|
||||
* 商品类型:0优惠券 1水滴 2阳光值 3肥料 4积分 5谢谢惠顾
|
||||
*/
|
||||
private Integer productType;
|
||||
/**
|
||||
* 状态(0:无效,1:有效)
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 提示语
|
||||
*/
|
||||
private String message;
|
||||
/**
|
||||
* 奖品数量
|
||||
*/
|
||||
private Integer allNum;
|
||||
/**
|
||||
* 支出数量
|
||||
*/
|
||||
private Integer outNum;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
}
|
@ -1,72 +0,0 @@
|
||||
package com.zbkj.common.model.game;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 游戏-抽奖规则表 Entity 实体类
|
||||
|
||||
*/
|
||||
@Data
|
||||
@TableName("eb_game_prize_draw_rule")
|
||||
public class GamePrizeDrawRule implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 游戏id
|
||||
*/
|
||||
private Integer gameId;
|
||||
/**
|
||||
* 限制用户
|
||||
*/
|
||||
private String limitUid;
|
||||
/**
|
||||
* 参与条件:0无需支付,1支付金额,2支付积分
|
||||
*/
|
||||
private Integer joinPay;
|
||||
/**
|
||||
* 消耗值
|
||||
*/
|
||||
private BigDecimal joinPrice;
|
||||
/**
|
||||
* 每天可参与次数
|
||||
*/
|
||||
private Integer dayNum;
|
||||
/**
|
||||
* 是否可分享:0不可分享,1可分享
|
||||
*/
|
||||
private Integer isShare;
|
||||
/**
|
||||
* 分享奖励抽奖最大次数
|
||||
*/
|
||||
private Integer shareAwardMax;
|
||||
/**
|
||||
* 分享奖励抽奖次数
|
||||
*/
|
||||
private Integer shareAwardNum;
|
||||
/**
|
||||
* 状态(0:无效,1:有效)
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
}
|
@ -1,120 +0,0 @@
|
||||
package com.zbkj.common.model.game;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@TableName("eb_game_tree_item")
|
||||
public class GameTreeItem implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 游戏id
|
||||
*/
|
||||
private Integer gameId;
|
||||
/**
|
||||
* 商品副标题
|
||||
*/
|
||||
private String title;
|
||||
/**
|
||||
* 商品编号
|
||||
*/
|
||||
private Integer productId;
|
||||
/**
|
||||
* 商品图
|
||||
*/
|
||||
private String productImage;
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String productName;
|
||||
/**
|
||||
* 商品价值
|
||||
*/
|
||||
private BigDecimal productPrice;
|
||||
/**
|
||||
* 总共数量
|
||||
*/
|
||||
private Integer allNum;
|
||||
/**
|
||||
* 支出数量
|
||||
*/
|
||||
private Integer outNum;
|
||||
/**
|
||||
* 果实数
|
||||
*/
|
||||
private Integer fruitNum;
|
||||
/**
|
||||
* 种植地点
|
||||
*/
|
||||
private String treePlace;
|
||||
/**
|
||||
* 养护人
|
||||
*/
|
||||
private String gardener;
|
||||
/**
|
||||
* 土壤
|
||||
*/
|
||||
private String soil;
|
||||
/**
|
||||
* 湿度
|
||||
*/
|
||||
private String humidity;
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
private String content;
|
||||
/**
|
||||
* 小苗阶段图
|
||||
*/
|
||||
private String smallImage;
|
||||
/**
|
||||
* 成长阶段图
|
||||
*/
|
||||
private String growImage;
|
||||
/**
|
||||
* 成熟阶段图
|
||||
*/
|
||||
private String bigImage;
|
||||
/**
|
||||
* 热门新品图
|
||||
*/
|
||||
private String hotImage;
|
||||
/**
|
||||
* 热门新品图显示几天
|
||||
*/
|
||||
private Integer hotDay;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 状态(0:无效,1:有效)
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 限制用户种植次数,-1无限制
|
||||
*/
|
||||
private Integer limitNum;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<String> userAvatar;
|
||||
|
||||
}
|
@ -1,67 +0,0 @@
|
||||
package com.zbkj.common.model.game;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 用户购买茶树表
|
||||
*/
|
||||
@Data
|
||||
@TableName("eb_game_tree_order")
|
||||
@ApiModel(value="GameTreeOrder对象", description="用户购买茶树表")
|
||||
public class GameTreeOrder implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "用户UID")
|
||||
private Integer uid;
|
||||
|
||||
@ApiModelProperty(value = "订单号")
|
||||
private String orderId;
|
||||
|
||||
@ApiModelProperty(value = "请求流水")
|
||||
private String requestNo;
|
||||
|
||||
@ApiModelProperty(value = "支付流水")
|
||||
private String paymentNo;
|
||||
|
||||
@ApiModelProperty(value = "游戏id")
|
||||
private Integer gameId;
|
||||
|
||||
@ApiModelProperty(value = "商品项id")
|
||||
private Integer itemId;
|
||||
|
||||
@ApiModelProperty(value = "支付状态:0无效,1有效")
|
||||
private Integer payStatus;
|
||||
|
||||
@ApiModelProperty(value = "购买数量")
|
||||
private Integer buyNum;
|
||||
|
||||
@ApiModelProperty(value = "支付金额")
|
||||
private BigDecimal payPrice;
|
||||
|
||||
@ApiModelProperty(value = "充值支付时间")
|
||||
private Date payTime;
|
||||
|
||||
@ApiModelProperty(value = "充值时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
@ApiModelProperty(value = "退款金额")
|
||||
private BigDecimal refundPrice;
|
||||
|
||||
|
||||
}
|
@ -1,53 +0,0 @@
|
||||
package com.zbkj.common.model.game;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@TableName("eb_game_tree_product")
|
||||
public class GameTreeProduct implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 兑换商品编号
|
||||
*/
|
||||
private Integer productId;
|
||||
/**
|
||||
* 兑换商品图
|
||||
*/
|
||||
private String productImage;
|
||||
/**
|
||||
* 兑换商品标题
|
||||
*/
|
||||
private String productTitle;
|
||||
/**
|
||||
* 所需要茶果价
|
||||
*/
|
||||
private Integer fruitPrice;
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private Boolean isDel;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
}
|
@ -1,79 +0,0 @@
|
||||
package com.zbkj.common.model.game;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@TableName("eb_game_tree_rule")
|
||||
public class GameTreeRule implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 游戏id
|
||||
*/
|
||||
private Integer gameId;
|
||||
/**
|
||||
* 限制用户
|
||||
*/
|
||||
private String limitUid;
|
||||
/**
|
||||
* 小苗阶段(开始~结束)
|
||||
*/
|
||||
private String smallStage;
|
||||
/**
|
||||
* 成长阶段(开始~结束)
|
||||
*/
|
||||
private String growStage;
|
||||
/**
|
||||
* 成熟阶段(开始~结束)
|
||||
*/
|
||||
private String bigStage;
|
||||
/**
|
||||
* 每次消耗水滴
|
||||
*/
|
||||
private Integer everyWater;
|
||||
/**
|
||||
* 每次消耗肥料
|
||||
*/
|
||||
private Integer everyManure;
|
||||
/**
|
||||
* 每次消耗肥料阶梯(json数据)
|
||||
*/
|
||||
private String everyManureStair;
|
||||
/**
|
||||
* 每次消耗阳光值
|
||||
*/
|
||||
private Integer everySunlight;
|
||||
/**
|
||||
* 每次消耗阳光值阶梯(json数据)
|
||||
*/
|
||||
private String everySunlightStair;
|
||||
/**
|
||||
* 状态(0:无效,1:有效)
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 总需水量
|
||||
*/
|
||||
private Integer waterTotal;
|
||||
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
package com.zbkj.common.model.game;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@TableName("eb_game_tree_task")
|
||||
public class GameTreeTask implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 游戏id
|
||||
*/
|
||||
private Integer gameId;
|
||||
/**
|
||||
* 任务:1签到,2浏览,3点赞
|
||||
*/
|
||||
private Integer taskType;
|
||||
/**
|
||||
* 每日任务限制
|
||||
*/
|
||||
private Integer taskLimit;
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
private String image;
|
||||
/**
|
||||
* 任务名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 条件
|
||||
*/
|
||||
private Integer stipulate;
|
||||
/**
|
||||
* 水滴
|
||||
*/
|
||||
private Integer water;
|
||||
/**
|
||||
* 肥料
|
||||
*/
|
||||
private Integer manure;
|
||||
/**
|
||||
* 阳光值
|
||||
*/
|
||||
private Integer sunlight;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
}
|
@ -1,71 +0,0 @@
|
||||
package com.zbkj.common.model.game;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName("eb_game_user_item")
|
||||
public class GameUserItem implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 游戏id
|
||||
*/
|
||||
private Integer gameId;
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Integer uid;
|
||||
/**
|
||||
* 业务类型:0抽奖,1茶株
|
||||
*/
|
||||
private Integer businessType;
|
||||
/**
|
||||
* 业务单号:存放奖品的主键id
|
||||
*/
|
||||
private String business;
|
||||
/**
|
||||
* 商品
|
||||
*/
|
||||
private Integer productId;
|
||||
/**
|
||||
* 商品图
|
||||
*/
|
||||
private String productImage;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String productName;
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private Integer productNum;
|
||||
/**
|
||||
* 商品价值
|
||||
*/
|
||||
private String productPrice;
|
||||
/**
|
||||
* 商品状态:1未领取/未种植,2已领取/已种植
|
||||
*/
|
||||
private Integer productStatus;
|
||||
/**
|
||||
* 茶树成长值:business_type=1时用 百分比
|
||||
*/
|
||||
private BigDecimal growValue;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
package com.zbkj.common.model.game;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 浇水表
|
||||
*/
|
||||
@Data
|
||||
public class Watering {
|
||||
|
||||
/**
|
||||
* 拥有水滴
|
||||
*/
|
||||
private Integer watering;
|
||||
/**
|
||||
* 拥有阳光值
|
||||
*/
|
||||
private Integer sunlight;
|
||||
/**
|
||||
* 拥有肥料
|
||||
*/
|
||||
private Integer fertilizer;
|
||||
|
||||
/**
|
||||
* 一次浇水所需消耗水滴
|
||||
*/
|
||||
private Integer wateringSum;
|
||||
/**
|
||||
* 所需阳光值数量
|
||||
*/
|
||||
private Integer sunlightSum;
|
||||
/**
|
||||
* 一次浇水所需消耗值数量(阶梯) [{"begin":"0","end":"40","sunlight":"2"},{"begin":"40","end":"70",,"sunlight":"3"},{"begin":"70","end":"99999","sunlight":"5"}]
|
||||
*/
|
||||
private String sunlightStair;
|
||||
/**
|
||||
* 一次浇水所需消耗肥料
|
||||
*/
|
||||
private Integer fertilizerSum;
|
||||
|
||||
/**
|
||||
* 浇水总次数 (后台配置)
|
||||
*/
|
||||
private Integer total;
|
||||
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
package com.zbkj.common.model.home;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import org.springframework.data.annotation.Transient;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@TableName("eb_home")
|
||||
public class Home implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId
|
||||
private Integer id;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
private String title;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer orderNo;
|
||||
/**
|
||||
* 列表路径
|
||||
*/
|
||||
private String directUrl;
|
||||
/**
|
||||
* 是否有效 1:有效,0:无效
|
||||
*/
|
||||
private Integer delFlag;
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
private String imgUrl;
|
||||
/**
|
||||
* 跳转id(list_ids/product_id)
|
||||
*/
|
||||
private String jumpIds;
|
||||
/**
|
||||
* 跳转类型1,列表0,详情
|
||||
*/
|
||||
private Integer jumpType;
|
||||
/**
|
||||
* 渠道:【1首页楼层,2套餐分类层】
|
||||
*/
|
||||
private Integer type;
|
||||
/**
|
||||
* 业务编号:【type=2 套餐分类(eb_category.id)】
|
||||
*/
|
||||
private Integer business;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
@Transient
|
||||
@TableField(exist = false)
|
||||
private List<HomeProducts> hpList;
|
||||
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
package com.zbkj.common.model.home;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName("eb_home_products")
|
||||
public class HomeProducts implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId
|
||||
private Integer id;
|
||||
/**
|
||||
* 楼层编号
|
||||
*/
|
||||
private Integer homeId;
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
private Integer productId;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer orderNo;
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
private String imgUrl;
|
||||
/**
|
||||
* 跳转地址
|
||||
*/
|
||||
private String directUrl;
|
||||
/**
|
||||
* 是否有效 1:有效 0:无效
|
||||
*/
|
||||
private Integer delFlag;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
}
|
@ -1,101 +0,0 @@
|
||||
package com.zbkj.common.model.video;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("eb_video")
|
||||
@ApiModel(value = "Video对象", description = "视频管理表")
|
||||
public class Video implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 视频管理ID
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 视频标题
|
||||
*/
|
||||
private String title;
|
||||
/**
|
||||
* 视频作者
|
||||
*/
|
||||
private Integer author;
|
||||
/**
|
||||
* 作者类型:1管理员,2游客
|
||||
*/
|
||||
private Integer authorType;
|
||||
/**
|
||||
* 视频图片
|
||||
*/
|
||||
private String imageInput;
|
||||
/**
|
||||
* 视频简介
|
||||
*/
|
||||
private String synopsis;
|
||||
/**
|
||||
* 视频分享标题
|
||||
*/
|
||||
private String shareTitle;
|
||||
/**
|
||||
* 视频分享简介
|
||||
*/
|
||||
private String shareSynopsis;
|
||||
/**
|
||||
* 浏览次数
|
||||
*/
|
||||
private String visit;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
/**
|
||||
* 原文链接
|
||||
*/
|
||||
private String url;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Boolean status;
|
||||
/**
|
||||
* 是否隐藏
|
||||
*/
|
||||
private Boolean hide;
|
||||
/**
|
||||
* 商品关联id
|
||||
*/
|
||||
private Integer productId;
|
||||
/**
|
||||
* 是否热门(小程序)
|
||||
*/
|
||||
private Boolean isHot;
|
||||
/**
|
||||
* 是否轮播图(小程序)
|
||||
*/
|
||||
private Boolean isBanner;
|
||||
/**
|
||||
* 视频详细内容
|
||||
*/
|
||||
private String content;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
}
|
@ -21,10 +21,10 @@ public class RegisterThirdUserRequest implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@ApiModelProperty(value = "用户昵称", required = true)
|
||||
@ApiModelProperty(value = "用户昵称")
|
||||
private String nickName;
|
||||
|
||||
@ApiModelProperty(value = "性别", required = true)
|
||||
@ApiModelProperty(value = "性别")
|
||||
private String sex;
|
||||
|
||||
@ApiModelProperty(value = "用户个人资料填写的省份")
|
||||
@ -36,14 +36,14 @@ public class RegisterThirdUserRequest implements Serializable {
|
||||
@ApiModelProperty(value = "国家,如中国为CN")
|
||||
private String country;
|
||||
|
||||
@ApiModelProperty(value = "微信小程序用户头像", required = true)
|
||||
@ApiModelProperty(value = "微信小程序用户头像")
|
||||
private String avatar;
|
||||
|
||||
@ApiModelProperty(value = "推广人id")
|
||||
@JsonProperty(value = "spread_spid", defaultValue = "0")
|
||||
private Integer spreadPid;
|
||||
|
||||
@ApiModelProperty(value = "微信公众号用户头像", required = true)
|
||||
@ApiModelProperty(value = "微信公众号用户头像")
|
||||
private String headimgurl;
|
||||
|
||||
@ApiModelProperty(value = "用户类型:wechat-公众号,routine-小程序,h5-H5,iosWx-苹果微信,androidWx-安卓微信")
|
||||
|
@ -0,0 +1,22 @@
|
||||
package com.zbkj.common.request;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SetMealRequest", description="套餐导航类型列表")
|
||||
public class SetMealFloorProRequest implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 3481659942630712958L;
|
||||
|
||||
@ApiModelProperty(value = "楼层id")
|
||||
private String homeId;
|
||||
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.zbkj.common.request;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SetMealRequest", description="套餐导航类型列表")
|
||||
public class SetMealFloorRequest implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 3481659942630712958L;
|
||||
|
||||
@ApiModelProperty(value = "门店id")
|
||||
private String storeId;
|
||||
|
||||
@ApiModelProperty(value = "类型id")
|
||||
private String cid;
|
||||
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.zbkj.common.request;
|
||||
|
||||
import com.zbkj.common.constants.Constants;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SetMealRequest", description="套餐导航类型列表")
|
||||
public class SetMealRequest implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 3481659942630712958L;
|
||||
|
||||
@ApiModelProperty(value = "门店id")
|
||||
private String storeId;
|
||||
|
||||
@ApiModelProperty(value = "2套餐分类层")
|
||||
private Integer homeType = Constants.HOME_TYPE_2;
|
||||
|
||||
}
|
@ -19,7 +19,6 @@ import java.math.BigDecimal;
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("eb_store_pink")
|
||||
@ApiModel(value="StorePink对象", description="拼团表")
|
||||
public class StorePinkRequest implements Serializable {
|
||||
|
||||
|
@ -19,7 +19,6 @@ import java.math.BigDecimal;
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("eb_store_pink")
|
||||
@ApiModel(value="StorePink对象", description="拼团表")
|
||||
public class StorePinkSearchRequest implements Serializable {
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.zbkj.common.response;
|
||||
|
||||
import com.zbkj.common.vo.HomeVo;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@ -7,7 +8,6 @@ import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -22,69 +22,16 @@ public class IndexInfoResponse implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@ApiModelProperty(value = "首页banner滚动图")
|
||||
private List<HashMap<String, Object>> banner;
|
||||
|
||||
@ApiModelProperty(value = "中间banner图")
|
||||
private List<HashMap<String, Object>> centreBanner;
|
||||
|
||||
@ApiModelProperty(value = "区块标题1")
|
||||
private List<HashMap<String, Object>> shardingTitle1;
|
||||
|
||||
@ApiModelProperty(value = "区块标题2")
|
||||
private List<HashMap<String, Object>> shardingTitle2;
|
||||
|
||||
@ApiModelProperty(value = "区块标题3")
|
||||
private List<HashMap<String, Object>> shardingTitle3;
|
||||
|
||||
@ApiModelProperty(value = "抽奖游戏,有活动则返回cid,无活动返回null")
|
||||
private String gamePrizeDrawId;
|
||||
|
||||
@ApiModelProperty(value = "种树游戏,有活动则返回cid,无活动返回null")
|
||||
private String gameTreeId;
|
||||
|
||||
@ApiModelProperty(value = "菜单模块")
|
||||
private List<HashMap<String, Object>> menus;
|
||||
|
||||
@ApiModelProperty(value = "导航模块")
|
||||
private List<HashMap<String, Object>> navigation;
|
||||
|
||||
@ApiModelProperty(value = "新闻简报消息滚动")
|
||||
private List<HashMap<String, Object>> roll;
|
||||
@ApiModelProperty(value = "首页楼层")
|
||||
private List<HomeVo> homeList;
|
||||
|
||||
@ApiModelProperty(value = "企业logo")
|
||||
private String logoUrl;
|
||||
|
||||
@ApiModelProperty(value = "场地预约-经度")
|
||||
private String longitude;
|
||||
|
||||
@ApiModelProperty(value = "场地预约-纬度")
|
||||
private String latitude;
|
||||
|
||||
@ApiModelProperty(value = "是否关注公众号")
|
||||
private boolean subscribe;
|
||||
|
||||
@ApiModelProperty(value = "首页超值爆款")
|
||||
private List<HashMap<String, Object>> explosiveMoney;
|
||||
|
||||
@ApiModelProperty(value = "首页精品推荐图片")
|
||||
private List<HashMap<String, Object>> bastBanner;
|
||||
|
||||
@ApiModelProperty(value = "云智服H5 url")
|
||||
private String yzfUrl;
|
||||
|
||||
@ApiModelProperty(value = "商品分类页配置")
|
||||
private String categoryPageConfig;
|
||||
|
||||
@ApiModelProperty(value = "是否隐藏一级分类")
|
||||
private String isShowCategory;
|
||||
|
||||
@ApiModelProperty(value = "客服电话")
|
||||
private String consumerHotline;
|
||||
|
||||
@ApiModelProperty(value = "客服电话服务开关")
|
||||
private String telephoneServiceSwitch;
|
||||
|
||||
@ApiModelProperty(value = "首页商品列表模板配置")
|
||||
private String homePageSaleListStyle;
|
||||
}
|
||||
|
@ -0,0 +1,36 @@
|
||||
package com.zbkj.common.response;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SetMealFloorProductResponse对象")
|
||||
public class SetMealFloorProResponse implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
@ApiModelProperty(value = "商品id")
|
||||
private Integer productId;
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
@ApiModelProperty(value = "图片")
|
||||
private String imgUrl;
|
||||
/**
|
||||
* 跳转地址
|
||||
*/
|
||||
@ApiModelProperty(value = "跳转地址")
|
||||
private String directUrl;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package com.zbkj.common.response;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SetMealFloorResponse对象")
|
||||
public class SetMealFloorResponse implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@ApiModelProperty(value = "id")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "标题")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "跳转地址")
|
||||
private String directUrl;
|
||||
|
||||
@ApiModelProperty(value = "图片")
|
||||
private String imgUrl;
|
||||
|
||||
@ApiModelProperty(value = "跳转id")
|
||||
private String jumpIds;
|
||||
|
||||
@ApiModelProperty(value = "跳转类型")
|
||||
private String jumpType;
|
||||
|
||||
private Object obj;
|
||||
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.zbkj.common.response;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="SetMealResponse对象", description="套餐导航类型列表")
|
||||
public class SetMealResponse implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@ApiModelProperty(value = "导航类型id")
|
||||
private Integer cid;
|
||||
|
||||
@ApiModelProperty(value = "导航类型名称")
|
||||
private String name;
|
||||
|
||||
}
|
@ -1,105 +0,0 @@
|
||||
package com.zbkj.common.utils;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.sun.org.apache.bcel.internal.generic.NEW;
|
||||
import com.zbkj.common.exception.CrmebException;
|
||||
import com.zbkj.common.model.game.Watering;
|
||||
import com.zbkj.common.response.WateringResponse;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
|
||||
/**
|
||||
* 浇水方法
|
||||
*/
|
||||
@Slf4j
|
||||
public class TeaTreeUtil {
|
||||
|
||||
|
||||
//阳光值消耗
|
||||
private static Integer sunConsume;
|
||||
|
||||
/**
|
||||
* 浇水
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static WateringResponse watering(Watering watering){
|
||||
//2.阳光值所在基数数量
|
||||
sunConsume = sunConsumeFun(watering.getSunlight(), watering.getSunlightStair());
|
||||
log.info("阳光值消耗数量:{}",sunConsume);
|
||||
|
||||
// 水滴生长计算
|
||||
Double waterDevelop = watering.getWateringSum()/watering.getWateringSum() * 0.3;
|
||||
|
||||
// 阳光生长计算
|
||||
// 消耗能量数目/5*35%
|
||||
Double sunlightDevelop = sunConsume / 5.0 * 0.35;
|
||||
|
||||
//肥料生长计算
|
||||
Double fertilizerDevelop = watering.getFertilizer() == 0 ? 0.0 : watering.getFertilizerSum() * 0.35;
|
||||
|
||||
log.info("肥料生长计算:{}",fertilizerDevelop);
|
||||
|
||||
//合计
|
||||
DecimalFormat df = new DecimalFormat("#.00");
|
||||
|
||||
double total = (waterDevelop + sunlightDevelop + fertilizerDevelop) * 100 / watering.getTotal();
|
||||
|
||||
WateringResponse response = new WateringResponse();
|
||||
response.setTotal(Double.parseDouble(df.format(total)));
|
||||
//用户剩余水滴
|
||||
response.setRemainingWatering(watering.getWatering() - watering.getWateringSum());
|
||||
|
||||
//用户剩余阳光值
|
||||
response.setRemainingSunlight(watering.getSunlight() - sunConsume < 0
|
||||
? 0
|
||||
: watering.getSunlight() - sunConsume);
|
||||
|
||||
//用户剩余肥料
|
||||
response.setRemainingFertilizer(watering.getFertilizer() - watering.getFertilizerSum() < 0
|
||||
? 0
|
||||
: watering.getFertilizer() - watering.getFertilizerSum());
|
||||
|
||||
log.info("最后浇水详情:{}",response);
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 阳光值消耗数量
|
||||
* @param sunlight
|
||||
* @param sunlightStair [{"begin":"0","end":"40","sunlight":"2"},{"begin":"40","end":"70","sunlight":"3"},{"begin":"70","end":"99999","sunlight":"5"}]
|
||||
* @return
|
||||
*/
|
||||
public static Integer sunConsumeFun(Integer sunlight, String sunlightStair) {
|
||||
Integer consume = 0;
|
||||
JSONArray stairArray = JSON.parseArray(sunlightStair);
|
||||
for (Object stair : stairArray) {
|
||||
JSONObject stairObj = (JSONObject) stair;
|
||||
Integer sBegin = Integer.parseInt(stairObj.get("begin").toString());
|
||||
Integer sEnd = Integer.parseInt(stairObj.get("end").toString());
|
||||
Integer sSunlight = Integer.parseInt(stairObj.get("sunlight").toString());
|
||||
// 使用 if-else 判断阳光值的范围
|
||||
if (sBegin >= sunlight && sunlight < sEnd) {
|
||||
consume = sSunlight;
|
||||
}
|
||||
}
|
||||
return consume;
|
||||
}
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
Watering watering = new Watering();
|
||||
watering.setWatering(10);
|
||||
watering.setSunlight(3);
|
||||
watering.setFertilizer(2);
|
||||
|
||||
watering.setWateringSum(10);
|
||||
watering.setFertilizerSum(1);
|
||||
watering.setTotal(1000);
|
||||
watering(watering);
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.zbkj.common.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="HomeProductVo", description="楼层商品信息")
|
||||
public class HomeProductVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
@ApiModelProperty(value = "商品id")
|
||||
private Integer productId;
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
@ApiModelProperty(value = "图片")
|
||||
private String imgUrl;
|
||||
/**
|
||||
* 跳转地址
|
||||
*/
|
||||
@ApiModelProperty(value = "跳转地址")
|
||||
private String directUrl;
|
||||
|
||||
}
|
64
food-common/src/main/java/com/zbkj/common/vo/HomeVo.java
Normal file
64
food-common/src/main/java/com/zbkj/common/vo/HomeVo.java
Normal file
@ -0,0 +1,64 @@
|
||||
package com.zbkj.common.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.zbkj.common.model.home.HomeProducts;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.data.annotation.Transient;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="HomeVo", description="楼层信息")
|
||||
public class HomeVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@ApiModelProperty(value = "名称")
|
||||
private String name;
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@ApiModelProperty(value = "标题")
|
||||
private String title;
|
||||
/**
|
||||
* 列表路径
|
||||
*/
|
||||
@ApiModelProperty(value = "列表路径")
|
||||
private String directUrl;
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
@ApiModelProperty(value = "图片")
|
||||
private String imgUrl;
|
||||
/**
|
||||
* 跳转id(list_ids/product_id)
|
||||
*/
|
||||
@ApiModelProperty(value = "跳转id(list_ids/product_id)")
|
||||
private String jumpIds;
|
||||
/**
|
||||
* 跳转类型1,列表0,详情
|
||||
*/
|
||||
@ApiModelProperty(value = "跳转类型1,列表0,详情")
|
||||
private Integer jumpType;
|
||||
|
||||
@Transient
|
||||
@TableField(exist = false)
|
||||
private List<HomeProductVo> hpList;
|
||||
|
||||
}
|
@ -21,8 +21,8 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class) //去掉数据源
|
||||
@ComponentScan(basePackages = {"com.zbkj", "com.zbkj.front"})
|
||||
@MapperScan(basePackages = {"com.zbkj.**.dao"})
|
||||
public class CrmebFrontApplication {
|
||||
public class FoodFrontApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(CrmebFrontApplication.class, args);
|
||||
SpringApplication.run(FoodFrontApplication.class, args);
|
||||
}
|
||||
}
|
@ -1,113 +0,0 @@
|
||||
package com.zbkj.front.controller;
|
||||
|
||||
import com.zbkj.common.page.CommonPage;
|
||||
import com.zbkj.common.request.BargainFrontRequest;
|
||||
import com.zbkj.common.request.PageParamRequest;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.zbkj.common.response.*;
|
||||
import com.zbkj.service.service.StoreBargainService;
|
||||
import com.zbkj.service.service.StoreBargainUserHelpService;
|
||||
import com.zbkj.service.service.StoreBargainUserService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* H5 砍价
|
||||
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("api/front/bargain")
|
||||
@Api(tags = "砍价商品")
|
||||
public class BargainController {
|
||||
|
||||
@Autowired
|
||||
private StoreBargainService storeBargainService;
|
||||
|
||||
@Autowired
|
||||
private StoreBargainUserService storeBargainUserService;
|
||||
|
||||
@Autowired
|
||||
private StoreBargainUserHelpService storeBargainUserHelpService;
|
||||
|
||||
/**
|
||||
* 砍价首页信息
|
||||
*/
|
||||
@ApiOperation(value = "砍价首页信息")
|
||||
@RequestMapping(value = "/index", method = RequestMethod.GET)
|
||||
public CommonResult<BargainIndexResponse> index(){
|
||||
return CommonResult.success(storeBargainService.getIndexInfo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 砍价商品列表header
|
||||
*/
|
||||
@ApiOperation(value = "砍价商品列表header")
|
||||
@RequestMapping(value = "/header", method = RequestMethod.GET)
|
||||
public CommonResult<BargainHeaderResponse> header(){
|
||||
return CommonResult.success(storeBargainService.getHeader());
|
||||
}
|
||||
|
||||
/**
|
||||
* 砍价商品列表
|
||||
* @return 砍价商品列表
|
||||
*/
|
||||
@ApiOperation(value = "砍价商品列表")
|
||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
||||
public CommonResult<PageInfo<StoreBargainDetailResponse>> list(@ModelAttribute PageParamRequest pageParamRequest){
|
||||
return CommonResult.success(storeBargainService.getH5List(pageParamRequest));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户砍价信息
|
||||
*/
|
||||
@ApiOperation(value = "获取用户砍价信息")
|
||||
@RequestMapping(value = "/user", method = RequestMethod.GET)
|
||||
public CommonResult<BargainUserInfoResponse> getBargainUserInfo(@ModelAttribute @Validated BargainFrontRequest bargainFrontRequest) {
|
||||
return CommonResult.success(storeBargainUserService.getBargainUserInfo(bargainFrontRequest));
|
||||
}
|
||||
|
||||
/**
|
||||
* 砍价商品详情
|
||||
*/
|
||||
@ApiOperation(value = "砍价商品详情")
|
||||
@RequestMapping(value = "/detail/{id}", method = RequestMethod.GET)
|
||||
public CommonResult<BargainDetailH5Response> detail(@PathVariable(value = "id") Integer id) {
|
||||
BargainDetailH5Response h5Detail = storeBargainService.getH5Detail(id);
|
||||
return CommonResult.success(h5Detail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建砍价活动
|
||||
*/
|
||||
@ApiOperation(value = "创建砍价活动")
|
||||
@RequestMapping(value = "/start", method = RequestMethod.POST)
|
||||
public CommonResult<Map<String, Object>> start(@RequestBody @Validated BargainFrontRequest bargainFrontRequest) {
|
||||
return CommonResult.success(storeBargainService.start(bargainFrontRequest));
|
||||
}
|
||||
|
||||
/**
|
||||
* 砍价
|
||||
*/
|
||||
@ApiOperation(value = "砍价")
|
||||
@RequestMapping(value = "/help", method = RequestMethod.POST)
|
||||
public CommonResult<Map<String, Object>> help(@RequestBody @Validated BargainFrontRequest bargainFrontRequest) {
|
||||
return CommonResult.success(storeBargainUserHelpService.help(bargainFrontRequest));
|
||||
}
|
||||
|
||||
/**
|
||||
* 砍价记录
|
||||
*/
|
||||
@ApiOperation(value = "砍价记录")
|
||||
@RequestMapping(value = "/record", method = RequestMethod.GET)
|
||||
public CommonResult<CommonPage<BargainRecordResponse>> recordList(@ModelAttribute PageParamRequest pageParamRequest) {
|
||||
return CommonResult.success(CommonPage.restPage(storeBargainUserService.getRecordList(pageParamRequest)));
|
||||
}
|
||||
|
||||
}
|
@ -1,101 +0,0 @@
|
||||
package com.zbkj.front.controller;
|
||||
|
||||
import com.zbkj.common.page.CommonPage;
|
||||
import com.zbkj.common.request.PageParamRequest;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.zbkj.common.model.combination.StoreCombination;
|
||||
import com.zbkj.common.request.StorePinkRequest;
|
||||
import com.zbkj.common.response.*;
|
||||
import com.zbkj.service.service.StoreCombinationService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 拼团商品
|
||||
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("api/front/combination")
|
||||
@Api(tags = "拼团商品")
|
||||
public class CombinationController {
|
||||
|
||||
@Autowired
|
||||
private StoreCombinationService storeCombinationService;
|
||||
|
||||
/**
|
||||
* 拼团首页
|
||||
*/
|
||||
@ApiOperation(value = "拼团首页数据")
|
||||
@RequestMapping(value = "/index", method = RequestMethod.GET)
|
||||
public CommonResult<CombinationIndexResponse> index() {
|
||||
return CommonResult.success(storeCombinationService.getIndexInfo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 拼团商品列表header
|
||||
*/
|
||||
@ApiOperation(value = "拼团商品列表header")
|
||||
@RequestMapping(value = "/header", method = RequestMethod.GET)
|
||||
public CommonResult<CombinationHeaderResponse> header() {
|
||||
return CommonResult.success(storeCombinationService.getHeader());
|
||||
}
|
||||
|
||||
/**
|
||||
* 拼团商品列表
|
||||
*/
|
||||
@ApiOperation(value = "拼团商品列表")
|
||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
||||
public CommonResult<CommonPage<StoreCombinationH5Response>> list(@ModelAttribute PageParamRequest pageParamRequest) {
|
||||
return CommonResult.success(CommonPage.restPage(storeCombinationService.getH5List(pageParamRequest)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 拼团商品详情
|
||||
*/
|
||||
@ApiOperation(value = "拼团商品详情")
|
||||
@RequestMapping(value = "/detail/{id}", method = RequestMethod.GET)
|
||||
public CommonResult<CombinationDetailResponse> detail(@PathVariable(value = "id") Integer id) {
|
||||
CombinationDetailResponse h5Detail = storeCombinationService.getH5Detail(id);
|
||||
return CommonResult.success(h5Detail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 去拼团
|
||||
* @param pinkId 拼团团长单id
|
||||
*/
|
||||
@ApiOperation(value = "去拼团")
|
||||
@RequestMapping(value = "/pink/{pinkId}", method = RequestMethod.GET)
|
||||
public CommonResult<GoPinkResponse> goPink(@PathVariable(value = "pinkId") Integer pinkId) {
|
||||
GoPinkResponse goPinkResponse = storeCombinationService.goPink(pinkId);
|
||||
return CommonResult.success(goPinkResponse);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更多拼团
|
||||
*/
|
||||
@ApiOperation(value = "更多拼团")
|
||||
@RequestMapping(value = "/more", method = RequestMethod.GET)
|
||||
public CommonResult<PageInfo<StoreCombination>> getMore(@RequestParam Integer comId, @Validated PageParamRequest pageParamRequest) {
|
||||
PageInfo<StoreCombination> more = storeCombinationService.getMore(pageParamRequest, comId);
|
||||
return CommonResult.success(more);
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消拼团
|
||||
*/
|
||||
@ApiOperation(value = "取消拼团")
|
||||
@RequestMapping(value = "/remove", method = RequestMethod.POST)
|
||||
public CommonResult<Object> remove(@RequestBody @Validated StorePinkRequest storePinkRequest) {
|
||||
if (storeCombinationService.removePink(storePinkRequest)) {
|
||||
return CommonResult.success("取消成功");
|
||||
} else {
|
||||
return CommonResult.failed("取消失败");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package com.zbkj.front.controller;
|
||||
|
||||
|
||||
import com.zbkj.common.page.CommonPage;
|
||||
import com.zbkj.common.request.PageParamRequest;
|
||||
import com.zbkj.common.request.SetMealFloorProRequest;
|
||||
import com.zbkj.common.request.SetMealFloorRequest;
|
||||
import com.zbkj.common.request.SetMealRequest;
|
||||
import com.zbkj.common.response.CommonResult;
|
||||
import com.zbkj.common.response.SetMealFloorProResponse;
|
||||
import com.zbkj.common.response.SetMealFloorResponse;
|
||||
import com.zbkj.common.response.SetMealResponse;
|
||||
import com.zbkj.service.service.EbHomeService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Slf4j
|
||||
@RestController("HomeController")
|
||||
@RequestMapping("api/front")
|
||||
@Api(tags = "楼层")
|
||||
public class HomeController {
|
||||
|
||||
@Autowired
|
||||
private EbHomeService homeService;
|
||||
|
||||
@ApiOperation(value = "套餐导航类型列表")
|
||||
@RequestMapping(value = "/setMeal/type", method = RequestMethod.GET)
|
||||
public CommonResult<CommonPage<SetMealResponse>> selectPageSetMealType(@Validated SetMealRequest entity, @Validated PageParamRequest page) {
|
||||
return CommonResult.success(homeService.selectPageSetMealType(entity, page));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "套餐楼层")
|
||||
@RequestMapping(value = "/setMeal/floor", method = RequestMethod.GET)
|
||||
public CommonResult<CommonPage<SetMealFloorResponse>> selectPageSetMealFloor(@Validated SetMealFloorRequest entity, @Validated PageParamRequest page) {
|
||||
return CommonResult.success(homeService.selectPageSetMealFloor(entity, page));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "套餐楼层商品")
|
||||
@RequestMapping(value = "/setMeal/floor/pro", method = RequestMethod.GET)
|
||||
public CommonResult<CommonPage<SetMealFloorProResponse>> selectPageSetMealFloorPro(@Validated SetMealFloorProRequest entity, @Validated PageParamRequest page) {
|
||||
return CommonResult.success(homeService.selectPageSetMealFloorPro(entity, page));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -42,7 +42,7 @@ public class IndexController {
|
||||
@ApiOperation(value="首页数据", notes="首页数据"
|
||||
+ " \n \n"
|
||||
+ "响应参数:" + " \n"
|
||||
+ "banner:首页顶部滚动图" + " \n"
|
||||
+ "homeList:首页顶部滚动图" + " \n"
|
||||
+ " --> image:图片" + " \n"
|
||||
+ " --> jump_url:跳转路径" + " \n"
|
||||
+ "navigation:导航栏" + " \n"
|
||||
|
@ -1,66 +0,0 @@
|
||||
package com.zbkj.front.controller;
|
||||
|
||||
import com.zbkj.common.page.CommonPage;
|
||||
import com.zbkj.common.request.ActivityCancelRequest;
|
||||
import com.zbkj.common.request.PageParamRequest;
|
||||
import com.zbkj.common.request.PlaceCancelRequest;
|
||||
import com.zbkj.common.request.PlaceRegisterFrontRequest;
|
||||
import com.zbkj.common.response.ActivityRegisterResponse;
|
||||
import com.zbkj.common.response.CommonResult;
|
||||
import com.zbkj.common.response.PlaceRegisterResponse;
|
||||
import com.zbkj.service.service.PlaceRegisterService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@Slf4j
|
||||
@RestController("PlaceRegisterController")
|
||||
@RequestMapping("api/front/place")
|
||||
@Api(tags = "场地")
|
||||
public class PlaceRegisterController {
|
||||
|
||||
@Autowired
|
||||
private PlaceRegisterService placeRegisterService;
|
||||
|
||||
@ApiOperation(value = "场地预约")
|
||||
@RequestMapping(value = "/subscribe", method = RequestMethod.POST)
|
||||
public CommonResult<Boolean> subscribe(@RequestBody @Validated PlaceRegisterFrontRequest request) {
|
||||
if (placeRegisterService.subscribe(request)) {
|
||||
return CommonResult.success();
|
||||
} else {
|
||||
return CommonResult.failed();
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "我场地预约列表")
|
||||
@RequestMapping(value = "/myRegisterList", method = RequestMethod.GET)
|
||||
public CommonResult<CommonPage<PlaceRegisterResponse>> myRegisterList(@Validated PageParamRequest pageParamRequest) {
|
||||
return CommonResult.success(CommonPage.restPage(placeRegisterService.myRegisterList(pageParamRequest)));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "预约删除")
|
||||
@RequestMapping(value = "/myRegisterList/del/{id}", method = RequestMethod.POST)
|
||||
public CommonResult<Boolean> registerDel(@PathVariable(name="id") String id) {
|
||||
if (placeRegisterService.recordsDelete(Integer.parseInt(id))) {
|
||||
return CommonResult.success();
|
||||
} else {
|
||||
return CommonResult.failed();
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "取消活动")
|
||||
@RequestMapping(value = "/cancel", method = RequestMethod.POST)
|
||||
public CommonResult<Boolean> cancel(@RequestBody @Validated PlaceCancelRequest request) {
|
||||
if (placeRegisterService.cancel(request)) {
|
||||
return CommonResult.success();
|
||||
} else {
|
||||
return CommonResult.failed();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -32,15 +32,6 @@ public class ProductController {
|
||||
@Autowired
|
||||
private ProductService productService;
|
||||
|
||||
/**
|
||||
* 促销单品(非遗抹茶)
|
||||
*/
|
||||
@ApiOperation(value = "非遗抹茶")
|
||||
@RequestMapping(value = "/product/sales", method = RequestMethod.GET)
|
||||
public CommonResult<CommonPage<IndexProductResponse>> getSalesProductList(@Validated PageParamRequest pageParamRequest) {
|
||||
return CommonResult.success(productService.getSalesProductList(pageParamRequest));
|
||||
}
|
||||
|
||||
/**
|
||||
* 热门商品推荐
|
||||
*/
|
||||
@ -50,15 +41,6 @@ public class ProductController {
|
||||
return CommonResult.success(productService.getHotProductList(pageParamRequest));
|
||||
}
|
||||
|
||||
/**
|
||||
* 优选商品推荐
|
||||
*/
|
||||
@ApiOperation(value = "优选商品推荐")
|
||||
@RequestMapping(value = "/product/good", method = RequestMethod.GET)
|
||||
public CommonResult<CommonPage<IndexProductResponse>> getGoodProductList(@Validated PageParamRequest pageParamRequest) {
|
||||
return CommonResult.success(productService.getGoodProductList(pageParamRequest));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取分类
|
||||
*/
|
||||
@ -82,7 +64,7 @@ public class ProductController {
|
||||
*/
|
||||
@ApiOperation(value = "商品详情")
|
||||
@RequestMapping(value = "/product/detail/{id}", method = RequestMethod.GET)
|
||||
@ApiImplicitParam(name = "type", value = "normal-正常,video-视频")
|
||||
@ApiImplicitParam(name = "type", value = "normal-正常")
|
||||
public CommonResult<ProductDetailResponse> getDetail(@PathVariable Integer id, @RequestParam(value = "type", defaultValue = "normal") String type) {
|
||||
return CommonResult.success(productService.getDetail(id, type));
|
||||
}
|
||||
|
@ -1,73 +0,0 @@
|
||||
package com.zbkj.front.controller;
|
||||
|
||||
import com.zbkj.common.page.CommonPage;
|
||||
import com.zbkj.common.request.PageParamRequest;
|
||||
import com.zbkj.common.request.UserBuyTeaPlantRequest;
|
||||
import com.zbkj.common.response.*;
|
||||
import com.zbkj.common.utils.CrmebUtil;
|
||||
import com.zbkj.service.service.TeaPlantOrderService;
|
||||
import com.zbkj.service.service.TeaPlantService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@RestController("TeaPlantController")
|
||||
@RequestMapping("api/front/teaPlant")
|
||||
@Api(tags = "茶树认领")
|
||||
public class TeaPlantController {
|
||||
|
||||
@Autowired
|
||||
private TeaPlantService teaPlantService;
|
||||
@Autowired
|
||||
private TeaPlantOrderService teaPlantOrderService;
|
||||
|
||||
@ApiOperation(value = "分页列表")
|
||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
||||
public CommonResult<CommonPage<TeaPlantResponse>> getList(@Validated PageParamRequest pageParamRequest) {
|
||||
return CommonResult.success(CommonPage.restPage(teaPlantService.getList(pageParamRequest)));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "认领详情")
|
||||
@RequestMapping(value = "/detail/{teaPlantId}", method = RequestMethod.GET)
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "teaPlantId", value = "编号", required = true),
|
||||
})
|
||||
public CommonResult<TeaPlantResponse> getDetail(@RequestParam(value = "teaPlantId") String teaPlantId) {
|
||||
return CommonResult.success(teaPlantService.getDetailFront(Integer.parseInt(teaPlantId)));
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/buyTeaPlant", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "认领茶树")
|
||||
public CommonResult<OrderPayResultResponse> buyTeaPlant(@Validated UserBuyTeaPlantRequest request, HttpServletRequest httpRequest) {
|
||||
String ip = CrmebUtil.getClientIp(httpRequest);
|
||||
request.setIp(ip);
|
||||
return CommonResult.success(teaPlantService.buyTeaPlant(request));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "我认领列表")
|
||||
@RequestMapping(value = "/myTeaPlantList", method = RequestMethod.GET)
|
||||
public CommonResult<CommonPage<TeaPlantOrderResponse>> myTeaPlantList(@Validated PageParamRequest pageParamRequest) {
|
||||
return CommonResult.success(CommonPage.restPage(teaPlantOrderService.myTeaPlantList(pageParamRequest)));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "我认领记录删除")
|
||||
@RequestMapping(value = "/myTeaPlantList/del/{id}", method = RequestMethod.POST)
|
||||
public CommonResult<Boolean> myTeaPlantOrderDel(@PathVariable(name="id") String id) {
|
||||
if (teaPlantOrderService.deleteOrderItem(Integer.parseInt(id))) {
|
||||
return CommonResult.success();
|
||||
} else {
|
||||
return CommonResult.failed();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -43,19 +43,19 @@ public class WeChatController {
|
||||
@Autowired
|
||||
private SystemNotificationService systemNotificationService;
|
||||
|
||||
/**
|
||||
* 通过微信code登录
|
||||
*/
|
||||
@ApiOperation(value = "微信登录公共号授权登录")
|
||||
@RequestMapping(value = "/authorize/login", method = RequestMethod.GET)
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "spread_spid", value = "推荐人id", dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "code", value = "code码", dataType = "String", required = true)
|
||||
})
|
||||
public CommonResult<LoginResponse> login(@RequestParam(value = "spread_spid", defaultValue = "0", required = false) Integer spreadUid,
|
||||
@RequestParam(value = "code") String code){
|
||||
return CommonResult.success(userCenterService.weChatAuthorizeLogin(code, spreadUid));
|
||||
}
|
||||
// /**
|
||||
// * 通过微信code登录
|
||||
// */
|
||||
// @ApiOperation(value = "微信登录公共号授权登录")
|
||||
// @RequestMapping(value = "/authorize/login", method = RequestMethod.GET)
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "spread_spid", value = "推荐人id", dataType = "Integer"),
|
||||
// @ApiImplicitParam(name = "code", value = "code码", dataType = "String", required = true)
|
||||
// })
|
||||
// public CommonResult<LoginResponse> login(@RequestParam(value = "spread_spid", defaultValue = "0", required = false) Integer spreadUid,
|
||||
// @RequestParam(value = "code") String code){
|
||||
// return CommonResult.success(userCenterService.weChatAuthorizeLogin(code, spreadUid));
|
||||
// }
|
||||
|
||||
/**
|
||||
* 微信登录小程序授权登录
|
||||
@ -66,24 +66,24 @@ public class WeChatController {
|
||||
return CommonResult.success(userCenterService.weChatAuthorizeProgramLogin(code, request));
|
||||
}
|
||||
|
||||
/**
|
||||
* 微信注册绑定手机号
|
||||
*/
|
||||
@ApiOperation(value = "微信注册绑定手机号")
|
||||
@RequestMapping(value = "/register/binding/phone", method = RequestMethod.POST)
|
||||
public CommonResult<LoginResponse> registerBindingPhone(@RequestBody @Validated WxBindingPhoneRequest request){
|
||||
return CommonResult.success(userCenterService.registerBindingPhone(request));
|
||||
}
|
||||
// /**
|
||||
// * 微信注册绑定手机号
|
||||
// */
|
||||
// @ApiOperation(value = "微信注册绑定手机号")
|
||||
// @RequestMapping(value = "/register/binding/phone", method = RequestMethod.POST)
|
||||
// public CommonResult<LoginResponse> registerBindingPhone(@RequestBody @Validated WxBindingPhoneRequest request){
|
||||
// return CommonResult.success(userCenterService.registerBindingPhone(request));
|
||||
// }
|
||||
|
||||
/**
|
||||
* 获取微信公众号js配置
|
||||
*/
|
||||
@ApiOperation(value = "获取微信公众号js配置")
|
||||
@RequestMapping(value = "/config", method = RequestMethod.GET)
|
||||
@ApiImplicitParam(name = "url", value = "页面地址url")
|
||||
public CommonResult<WeChatJsSdkConfigResponse> configJs(@RequestParam(value = "url") String url){
|
||||
return CommonResult.success(wechatNewService.getJsSdkConfig(url));
|
||||
}
|
||||
// /**
|
||||
// * 获取微信公众号js配置
|
||||
// */
|
||||
// @ApiOperation(value = "获取微信公众号js配置")
|
||||
// @RequestMapping(value = "/config", method = RequestMethod.GET)
|
||||
// @ApiImplicitParam(name = "url", value = "页面地址url")
|
||||
// public CommonResult<WeChatJsSdkConfigResponse> configJs(@RequestParam(value = "url") String url){
|
||||
// return CommonResult.success(wechatNewService.getJsSdkConfig(url));
|
||||
// }
|
||||
|
||||
/**
|
||||
* 小程序获取授权logo
|
||||
@ -96,15 +96,15 @@ public class WeChatController {
|
||||
return CommonResult.success(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 订阅消息模板列表
|
||||
*/
|
||||
@ApiOperation(value = "订阅消息模板列表")
|
||||
@RequestMapping(value = "/program/my/temp/list", method = RequestMethod.GET)
|
||||
@ApiImplicitParam(name = "type", value = "支付之前:beforePay|支付成功:afterPay|申请退款:refundApply|充值之前:beforeRecharge|创建砍价:createBargain|参与拼团:pink|取消拼团:cancelPink")
|
||||
public CommonResult<List<TemplateMessage>> programMyTempList(@RequestParam(name = "type") String type){
|
||||
return CommonResult.success(systemNotificationService.getMiniTempList(type));
|
||||
}
|
||||
// /**
|
||||
// * 订阅消息模板列表
|
||||
// */
|
||||
// @ApiOperation(value = "订阅消息模板列表")
|
||||
// @RequestMapping(value = "/program/my/temp/list", method = RequestMethod.GET)
|
||||
// @ApiImplicitParam(name = "type", value = "支付之前:beforePay|支付成功:afterPay|申请退款:refundApply|充值之前:beforeRecharge|创建砍价:createBargain|参与拼团:pink|取消拼团:cancelPink")
|
||||
// public CommonResult<List<TemplateMessage>> programMyTempList(@RequestParam(name = "type") String type){
|
||||
// return CommonResult.success(systemNotificationService.getMiniTempList(type));
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.zbkj.common.model.home.Home;
|
||||
import com.zbkj.common.page.CommonPage;
|
||||
import com.zbkj.common.response.IndexInfoResponse;
|
||||
import com.zbkj.common.response.IndexProductResponse;
|
||||
@ -56,7 +57,7 @@ public class IndexServiceImpl implements IndexService {
|
||||
private UserVisitRecordService userVisitRecordService;
|
||||
|
||||
@Autowired
|
||||
private GameService gameService;
|
||||
private EbHomeService homeService;
|
||||
|
||||
/**
|
||||
* 首页数据
|
||||
@ -65,35 +66,11 @@ public class IndexServiceImpl implements IndexService {
|
||||
@Override
|
||||
public IndexInfoResponse getIndexInfo() {
|
||||
IndexInfoResponse indexInfoResponse = new IndexInfoResponse();
|
||||
indexInfoResponse.setBanner(systemGroupDataService.getListMapByGid(Constants.GROUP_DATA_ID_INDEX_BANNER)); // 首页顶部banner滚动图
|
||||
indexInfoResponse.setNavigation(systemGroupDataService.getListMapByGid(Constants.GROUP_DATA_ID_INDEX_NAVIGATION)); // 首页_导航栏
|
||||
indexInfoResponse.setShardingTitle1(systemGroupDataService.getListMapByGid(Constants.GROUP_DATA_ID_INDEX_SHARDING_TITLE)); // 首页中间分区标题
|
||||
indexInfoResponse.setShardingTitle2(systemGroupDataService.getListMapByGid(Constants.GROUP_DATA_ID_INDEX_SHARDING_TITLE2)); // 首页中间分区标题
|
||||
indexInfoResponse.setShardingTitle3(systemGroupDataService.getListMapByGid(Constants.GROUP_DATA_ID_INDEX_SHARDING_TITLE3)); // 首页中间分区标题
|
||||
indexInfoResponse.setGamePrizeDrawId(gameService.getValidGameByCid(Constants.CATEGORY_TYPE_GAME_ID)); // 抽奖游戏
|
||||
indexInfoResponse.setGameTreeId(gameService.getValidGameByCid(Constants.CATEGORY_TYPE_TREE_ID)); // 种树游戏
|
||||
|
||||
// indexInfoResponse.setCentreBanner(systemGroupDataService.getListMapByGid(Constants.GROUP_DATA_ID_INDEX_BEST_BANNER)); // 首页中间banner图
|
||||
indexInfoResponse.setMenus(systemGroupDataService.getListMapByGid(Constants.GROUP_DATA_ID_INDEX_MENU)); // 首页_菜单栏
|
||||
|
||||
// indexInfoResponse.setRoll(systemGroupDataService.getListMapByGid(Constants.GROUP_DATA_ID_INDEX_NEWS_BANNER)); //首页滚动新闻
|
||||
|
||||
indexInfoResponse.setLongitude(systemConfigService.getValueByKey(Constants.CONFIG_KEY_SITE_LONGITUDE));// 场地预约-经度
|
||||
indexInfoResponse.setLatitude(systemConfigService.getValueByKey(Constants.CONFIG_KEY_SITE_LATITUDE));// 场地预约-纬度
|
||||
|
||||
indexInfoResponse.setHomeList(homeService.selectHomeType(Constants.HOME_TYPE_1, 0)); // 楼层
|
||||
indexInfoResponse.setLogoUrl(systemConfigService.getValueByKey(Constants.CONFIG_KEY_SITE_LOGO));// 企业logo地址
|
||||
// indexInfoResponse.setYzfUrl(systemConfigService.getValueByKey(Constants.CONFIG_KEY_YZF_H5_URL));// 云智服H5 url
|
||||
indexInfoResponse.setConsumerHotline(systemConfigService.getValueByKey(Constants.CONFIG_KEY_CONSUMER_HOTLINE));// 客服电话
|
||||
indexInfoResponse.setTelephoneServiceSwitch(systemConfigService.getValueByKey(Constants.CONFIG_KEY_TELEPHONE_SERVICE_SWITCH));// 客服电话服务
|
||||
// indexInfoResponse.setCategoryPageConfig(systemConfigService.getValueByKey(Constants.CONFIG_CATEGORY_CONFIG));// 商品分类页配置
|
||||
// indexInfoResponse.setIsShowCategory(systemConfigService.getValueByKey(Constants.CONFIG_IS_SHOW_CATEGORY));// 是否隐藏一级分类
|
||||
// indexInfoResponse.setExplosiveMoney(systemGroupDataService.getListMapByGid(Constants.GROUP_DATA_ID_INDEX_EX_BANNER));//首页超值爆款
|
||||
// indexInfoResponse.setHomePageSaleListStyle(systemConfigService.getValueByKey(Constants.CONFIG_IS_PRODUCT_LIST_STYLE));// 首页商品列表模板配置
|
||||
indexInfoResponse.setSubscribe(false);
|
||||
User user = userService.getInfo();
|
||||
if(ObjectUtil.isNotNull(user) && user.getSubscribe()) {
|
||||
indexInfoResponse.setSubscribe(user.getSubscribe());
|
||||
}
|
||||
|
||||
// 保存用户访问记录
|
||||
UserVisitRecord visitRecord = new UserVisitRecord();
|
||||
|
@ -81,9 +81,6 @@ public class UserCenterServiceImpl extends ServiceImpl<UserDao, User> implements
|
||||
@Autowired
|
||||
private UserTokenService userTokenService;
|
||||
|
||||
@Autowired
|
||||
private UserBrokerageRecordService userBrokerageRecordService;
|
||||
|
||||
@Autowired
|
||||
private TransactionTemplate transactionTemplate;
|
||||
|
||||
@ -122,7 +119,7 @@ public class UserCenterServiceImpl extends ServiceImpl<UserDao, User> implements
|
||||
public UserCommissionResponse getCommission() {
|
||||
User user = userService.getInfoException();
|
||||
// 昨天得佣金
|
||||
BigDecimal yesterdayIncomes = userBrokerageRecordService.getYesterdayIncomes(user.getUid());
|
||||
BigDecimal yesterdayIncomes = BigDecimal.ZERO;
|
||||
//累计已提取佣金
|
||||
BigDecimal totalMoney = userExtractService.getExtractTotalMoney(user.getUid());
|
||||
|
||||
@ -293,60 +290,7 @@ public class UserCenterServiceImpl extends ServiceImpl<UserDao, User> implements
|
||||
}
|
||||
UserSpreadOrderResponse spreadOrderResponse = new UserSpreadOrderResponse();
|
||||
// 获取累计推广条数
|
||||
Integer spreadCount = userBrokerageRecordService.getSpreadCountByUid(user.getUid());
|
||||
spreadOrderResponse.setCount(spreadCount.longValue());
|
||||
if (spreadCount.equals(0)) {
|
||||
return spreadOrderResponse;
|
||||
}
|
||||
|
||||
// 获取推广订单记录,分页
|
||||
List<UserBrokerageRecord> recordList = userBrokerageRecordService.findSpreadListByUid(user.getUid(), pageParamRequest);
|
||||
// 获取对应的订单信息
|
||||
List<String> orderNoList = recordList.stream().map(UserBrokerageRecord::getLinkId).collect(Collectors.toList());
|
||||
Map<String, StoreOrder> orderMap = storeOrderService.getMapInOrderNo(orderNoList);
|
||||
// 获取对应的用户信息
|
||||
List<StoreOrder> storeOrderList = new ArrayList<>(orderMap.values());
|
||||
List<Integer> uidList = storeOrderList.stream().map(StoreOrder::getUid).distinct().collect(Collectors.toList());
|
||||
HashMap<Integer, User> userMap = userService.getMapListInUid(uidList);
|
||||
|
||||
List<UserSpreadOrderItemResponse> userSpreadOrderItemResponseList = new ArrayList<>();
|
||||
List<String> monthList = CollUtil.newArrayList();
|
||||
recordList.forEach(record -> {
|
||||
UserSpreadOrderItemChildResponse userSpreadOrderItemChildResponse = new UserSpreadOrderItemChildResponse();
|
||||
userSpreadOrderItemChildResponse.setOrderId(record.getLinkId());
|
||||
userSpreadOrderItemChildResponse.setTime(record.getUpdateTime());
|
||||
userSpreadOrderItemChildResponse.setNumber(record.getPrice());
|
||||
Integer orderUid = orderMap.get(record.getLinkId()).getUid();
|
||||
userSpreadOrderItemChildResponse.setAvatar(userMap.get(orderUid).getAvatar());
|
||||
userSpreadOrderItemChildResponse.setNickname(userMap.get(orderUid).getNickname());
|
||||
userSpreadOrderItemChildResponse.setType("返佣");
|
||||
|
||||
String month = DateUtil.dateToStr(record.getUpdateTime(), Constants.DATE_FORMAT_MONTH);
|
||||
if (monthList.contains(month)) {
|
||||
//如果在已有的数据中找到当前月份数据则追加
|
||||
for (UserSpreadOrderItemResponse userSpreadOrderItemResponse : userSpreadOrderItemResponseList) {
|
||||
if (userSpreadOrderItemResponse.getTime().equals(month)) {
|
||||
userSpreadOrderItemResponse.getChild().add(userSpreadOrderItemChildResponse);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {// 不包含此月份
|
||||
//创建一个
|
||||
UserSpreadOrderItemResponse userSpreadOrderItemResponse = new UserSpreadOrderItemResponse();
|
||||
userSpreadOrderItemResponse.setTime(month);
|
||||
userSpreadOrderItemResponse.getChild().add(userSpreadOrderItemChildResponse);
|
||||
userSpreadOrderItemResponseList.add(userSpreadOrderItemResponse);
|
||||
monthList.add(month);
|
||||
}
|
||||
});
|
||||
|
||||
// 获取月份总订单数
|
||||
Map<String, Integer> countMap = userBrokerageRecordService.getSpreadCountByUidAndMonth(user.getUid(), monthList);
|
||||
for (UserSpreadOrderItemResponse userSpreadOrderItemResponse: userSpreadOrderItemResponseList) {
|
||||
userSpreadOrderItemResponse.setCount(countMap.get(userSpreadOrderItemResponse.getTime()));
|
||||
}
|
||||
|
||||
spreadOrderResponse.setList(userSpreadOrderItemResponseList);
|
||||
spreadOrderResponse.setCount(0L);
|
||||
return spreadOrderResponse;
|
||||
}
|
||||
|
||||
@ -504,20 +448,22 @@ public class UserCenterServiceImpl extends ServiceImpl<UserDao, User> implements
|
||||
}
|
||||
// 记录最后一次登录时间
|
||||
user.setLastLoginTime(DateUtil.nowDateTime());
|
||||
Boolean execute = transactionTemplate.execute(e -> {
|
||||
// 分销绑定
|
||||
if (userService.checkBingSpread(user, request.getSpreadPid(), "old")) {
|
||||
user.setSpreadUid(request.getSpreadPid());
|
||||
user.setSpreadTime(DateUtil.nowDateTime());
|
||||
// 处理新旧推广人数据
|
||||
userService.updateSpreadCountByUid(request.getSpreadPid(), "add");
|
||||
}
|
||||
userService.updateById(user);
|
||||
return Boolean.TRUE;
|
||||
});
|
||||
if (!execute) {
|
||||
logger.error(StrUtil.format("小程序登录绑定分销关系失败,uid={},spreadUid={}", user.getUid(), request.getSpreadPid()));
|
||||
}
|
||||
userService.updateById(user);
|
||||
|
||||
// Boolean execute = transactionTemplate.execute(e -> {
|
||||
// // 分销绑定
|
||||
// if (userService.checkBingSpread(user, request.getSpreadPid(), "old")) {
|
||||
// user.setSpreadUid(request.getSpreadPid());
|
||||
// user.setSpreadTime(DateUtil.nowDateTime());
|
||||
// // 处理新旧推广人数据
|
||||
// userService.updateSpreadCountByUid(request.getSpreadPid(), "add");
|
||||
// }
|
||||
// userService.updateById(user);
|
||||
// return Boolean.TRUE;
|
||||
// });
|
||||
// if (!execute) {
|
||||
// logger.error(StrUtil.format("小程序登录绑定分销关系失败,uid={},spreadUid={}", user.getUid(), request.getSpreadPid()));
|
||||
// }
|
||||
|
||||
try {
|
||||
String token = tokenComponent.createToken(user);
|
||||
@ -595,12 +541,12 @@ public class UserCenterServiceImpl extends ServiceImpl<UserDao, User> implements
|
||||
boolean finalIsNew = isNew;
|
||||
Boolean execute = transactionTemplate.execute(e -> {
|
||||
if (finalIsNew) {// 新用户
|
||||
// 分销绑定
|
||||
if (userService.checkBingSpread(finalUser, registerThirdUserRequest.getSpreadPid(), "new")) {
|
||||
finalUser.setSpreadUid(registerThirdUserRequest.getSpreadPid());
|
||||
finalUser.setSpreadTime(DateUtil.nowDateTime());
|
||||
userService.updateSpreadCountByUid(registerThirdUserRequest.getSpreadPid(), "add");
|
||||
}
|
||||
// // 分销绑定
|
||||
// if (userService.checkBingSpread(finalUser, registerThirdUserRequest.getSpreadPid(), "new")) {
|
||||
// finalUser.setSpreadUid(registerThirdUserRequest.getSpreadPid());
|
||||
// finalUser.setSpreadTime(DateUtil.nowDateTime());
|
||||
// userService.updateSpreadCountByUid(registerThirdUserRequest.getSpreadPid(), "add");
|
||||
// }
|
||||
userService.save(finalUser);
|
||||
// 赠送新人券
|
||||
giveNewPeopleCoupon(finalUser.getUid());
|
||||
@ -650,44 +596,8 @@ public class UserCenterServiceImpl extends ServiceImpl<UserDao, User> implements
|
||||
*/
|
||||
@Override
|
||||
public List<User> getTopBrokerageListByDate(String type, PageParamRequest pageParamRequest) {
|
||||
// 获取佣金排行榜(周、月)
|
||||
List<UserBrokerageRecord> recordList = userBrokerageRecordService.getBrokerageTopByDate(type);
|
||||
if (CollUtil.isEmpty(recordList)) {
|
||||
return null;
|
||||
}
|
||||
// 解决0元排行问题
|
||||
for (int i = 0; i < recordList.size();) {
|
||||
UserBrokerageRecord userBrokerageRecord = recordList.get(i);
|
||||
if (userBrokerageRecord.getPrice().compareTo(BigDecimal.ZERO) < 1) {
|
||||
recordList.remove(i);
|
||||
continue;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
if (CollUtil.isEmpty(recordList)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<Integer> uidList = recordList.stream().map(UserBrokerageRecord::getUid).collect(Collectors.toList());
|
||||
//查询用户
|
||||
HashMap<Integer, User> userVoList = userService.getMapListInUid(uidList);
|
||||
|
||||
//解决排序问题
|
||||
List<User> userList = CollUtil.newArrayList();
|
||||
for (UserBrokerageRecord record: recordList) {
|
||||
User user = new User();
|
||||
User userVo = userVoList.get(record.getUid());
|
||||
|
||||
user.setUid(record.getUid());
|
||||
user.setAvatar(userVo.getAvatar());
|
||||
user.setBrokeragePrice(record.getPrice());
|
||||
if (StrUtil.isBlank(userVo.getNickname())) {
|
||||
user.setNickname(userVo.getPhone().substring(0, 2) + "****" + userVo.getPhone().substring(7));
|
||||
}else{
|
||||
user.setNickname(userVo.getNickname());
|
||||
}
|
||||
userList.add(user);
|
||||
}
|
||||
return userList;
|
||||
}
|
||||
|
||||
@ -708,21 +618,6 @@ public class UserCenterServiceImpl extends ServiceImpl<UserDao, User> implements
|
||||
@Override
|
||||
public Integer getNumberByTop(String type) {
|
||||
int number = 0;
|
||||
Integer userId = userService.getUserIdException();
|
||||
PageParamRequest pageParamRequest = new PageParamRequest();
|
||||
pageParamRequest.setLimit(100);
|
||||
|
||||
List<UserBrokerageRecord> recordList = userBrokerageRecordService.getBrokerageTopByDate(type);
|
||||
if (CollUtil.isEmpty(recordList)) {
|
||||
return number;
|
||||
}
|
||||
|
||||
for (int i = 0; i < recordList.size(); i++) {
|
||||
if (recordList.get(i).getUid().equals(userId)) {
|
||||
number = i + 1;
|
||||
break ;
|
||||
}
|
||||
}
|
||||
return number;
|
||||
}
|
||||
|
||||
@ -758,29 +653,7 @@ public class UserCenterServiceImpl extends ServiceImpl<UserDao, User> implements
|
||||
userBill.setStatus(1);
|
||||
userBill.setCreateTime(DateUtil.nowDateTime());
|
||||
|
||||
// userBrokerage转出记录
|
||||
UserBrokerageRecord brokerageRecord = new UserBrokerageRecord();
|
||||
brokerageRecord.setUid(user.getUid());
|
||||
brokerageRecord.setLinkId("0");
|
||||
brokerageRecord.setLinkType(BrokerageRecordConstants.BROKERAGE_RECORD_LINK_TYPE_YUE);
|
||||
brokerageRecord.setType(BrokerageRecordConstants.BROKERAGE_RECORD_TYPE_SUB);
|
||||
brokerageRecord.setTitle(BrokerageRecordConstants.BROKERAGE_RECORD_TITLE_BROKERAGE_YUE);
|
||||
brokerageRecord.setPrice(price);
|
||||
brokerageRecord.setBalance(user.getNowMoney().add(price));
|
||||
brokerageRecord.setMark(StrUtil.format("佣金转余额,减少{}", price));
|
||||
brokerageRecord.setStatus(BrokerageRecordConstants.BROKERAGE_RECORD_STATUS_COMPLETE);
|
||||
brokerageRecord.setCreateTime(DateUtil.nowDateTime());
|
||||
|
||||
Boolean execute = transactionTemplate.execute(e -> {
|
||||
// 扣佣金
|
||||
userService.operationBrokerage(user.getUid(), price, user.getBrokeragePrice(), "sub");
|
||||
// 加余额
|
||||
userService.operationNowMoney(user.getUid(), price, user.getNowMoney(), "add");
|
||||
userBillService.save(userBill);
|
||||
userBrokerageRecordService.save(brokerageRecord);
|
||||
return Boolean.TRUE;
|
||||
});
|
||||
return execute;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -798,8 +671,8 @@ public class UserCenterServiceImpl extends ServiceImpl<UserDao, User> implements
|
||||
*/
|
||||
@Override
|
||||
public PageInfo<SpreadCommissionDetailResponse> getSpreadCommissionDetail(PageParamRequest pageParamRequest) {
|
||||
User user = userService.getInfoException();
|
||||
return userBrokerageRecordService.findDetailListByUid(user.getUid(), pageParamRequest);
|
||||
PageInfo<SpreadCommissionDetailResponse> info = new PageInfo<>();
|
||||
return CommonPage.copyPageInfo(info, new ArrayList<>());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -992,7 +865,7 @@ public class UserCenterServiceImpl extends ServiceImpl<UserDao, User> implements
|
||||
// 可提现佣金
|
||||
BigDecimal brokeragePrice = user.getBrokeragePrice();
|
||||
// 冻结佣金
|
||||
BigDecimal freeze = userBrokerageRecordService.getFreezePrice(user.getUid());
|
||||
BigDecimal freeze = BigDecimal.ZERO;
|
||||
return new UserExtractCashResponse(minPrice, brokeragePrice, freeze, extractTime);
|
||||
}
|
||||
|
||||
|
@ -6,9 +6,9 @@ spring:
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
url: jdbc:mysql://ordinary.jimostudio.link:26449/syy_dev?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
|
||||
url: jdbc:mysql://xunyingcloud.cn:23306/prepare_food?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: minxianrui
|
||||
password: x6dbfGN4s6YjcX8P
|
||||
minimum-idle: 1
|
||||
maximum-pool-size: 10
|
||||
idle-timeout: 600000
|
||||
|
@ -15,7 +15,7 @@ server:
|
||||
spring:
|
||||
profiles:
|
||||
# 配置的环境
|
||||
active: prod
|
||||
active: dev
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 50MB #设置单个文件大小
|
||||
|
@ -0,0 +1,8 @@
|
||||
package com.zbkj.service.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zbkj.common.model.deliveryset.DeliverySetFee;
|
||||
|
||||
public interface DeliverySetFeeDao extends BaseMapper<DeliverySetFee> {
|
||||
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.zbkj.service.dao;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zbkj.common.model.deliveryset.DeliverySetTime;
|
||||
|
||||
public interface DeliverySetTimeDao extends BaseMapper<DeliverySetTime> {
|
||||
|
||||
}
|
19
food-service/src/main/java/com/zbkj/service/dao/HomeDao.java
Normal file
19
food-service/src/main/java/com/zbkj/service/dao/HomeDao.java
Normal file
@ -0,0 +1,19 @@
|
||||
package com.zbkj.service.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zbkj.common.model.home.Home;
|
||||
import com.zbkj.common.request.PageParamRequest;
|
||||
import com.zbkj.common.request.SetMealFloorRequest;
|
||||
import com.zbkj.common.request.SetMealRequest;
|
||||
import com.zbkj.common.response.SetMealFloorResponse;
|
||||
import com.zbkj.common.response.SetMealResponse;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface HomeDao extends BaseMapper<Home> {
|
||||
|
||||
List<SetMealResponse> selectPageSetMealType(@Param("entity") SetMealRequest entity, PageParamRequest page);
|
||||
|
||||
List<SetMealFloorResponse> selectPageSetMealFloor(@Param("entity") SetMealFloorRequest entity, PageParamRequest page);
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.zbkj.service.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zbkj.common.model.home.HomeProducts;
|
||||
import com.zbkj.common.request.PageParamRequest;
|
||||
import com.zbkj.common.response.SetMealFloorProResponse;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface HomeProductsDao extends BaseMapper<HomeProducts> {
|
||||
|
||||
List<SetMealFloorProResponse> selectPageFloorProduct(@Param("entity") HomeProducts qHp, PageParamRequest page);
|
||||
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.zbkj.service.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zbkj.common.model.deliveryset.DeliverySetFee;
|
||||
|
||||
public interface DeliverySetFeeService extends IService<DeliverySetFee> {
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,10 @@
|
||||
package com.zbkj.service.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zbkj.common.model.deliveryset.DeliverySetTime;
|
||||
|
||||
public interface DeliverySetTimeService extends IService<DeliverySetTime> {
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,10 @@
|
||||
package com.zbkj.service.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zbkj.common.model.home.HomeProducts;
|
||||
|
||||
public interface EbHomeProductsService extends IService<HomeProducts> {
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,29 @@
|
||||
package com.zbkj.service.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zbkj.common.model.home.Home;
|
||||
import com.zbkj.common.page.CommonPage;
|
||||
import com.zbkj.common.request.PageParamRequest;
|
||||
import com.zbkj.common.request.SetMealFloorProRequest;
|
||||
import com.zbkj.common.request.SetMealFloorRequest;
|
||||
import com.zbkj.common.request.SetMealRequest;
|
||||
import com.zbkj.common.response.SetMealFloorProResponse;
|
||||
import com.zbkj.common.response.SetMealFloorResponse;
|
||||
import com.zbkj.common.response.SetMealResponse;
|
||||
import com.zbkj.common.vo.HomeVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public interface EbHomeService extends IService<Home> {
|
||||
|
||||
List<HomeVo> selectHomeType(Integer homeType, Integer storeId);
|
||||
|
||||
CommonPage<SetMealResponse> selectPageSetMealType(SetMealRequest entity, PageParamRequest page);
|
||||
|
||||
CommonPage<SetMealFloorResponse> selectPageSetMealFloor(SetMealFloorRequest entity, PageParamRequest page);
|
||||
|
||||
CommonPage<SetMealFloorProResponse> selectPageSetMealFloorPro(SetMealFloorProRequest entity, PageParamRequest page);
|
||||
|
||||
}
|
||||
|
@ -9,10 +9,8 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zbkj.common.constants.Constants;
|
||||
import com.zbkj.common.exception.CrmebException;
|
||||
import com.zbkj.common.model.activity.Activity;
|
||||
import com.zbkj.common.model.article.Article;
|
||||
import com.zbkj.common.model.category.Category;
|
||||
import com.zbkj.common.model.user.User;
|
||||
import com.zbkj.common.page.CommonPage;
|
||||
import com.zbkj.common.request.ActivityListRequest;
|
||||
import com.zbkj.common.request.ArticleRequest;
|
||||
@ -24,7 +22,6 @@ import com.zbkj.common.vo.ArticleVo;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.zbkj.common.vo.PlaceRegisterVo;
|
||||
import com.zbkj.service.dao.ArticleDao;
|
||||
import com.zbkj.service.service.*;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@ -35,7 +32,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
@ -0,0 +1,12 @@
|
||||
package com.zbkj.service.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zbkj.common.model.deliveryset.DeliverySetFee;
|
||||
import com.zbkj.service.dao.DeliverySetFeeDao;
|
||||
import com.zbkj.service.service.DeliverySetFeeService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class DeliverySetFeeServiceImpl extends ServiceImpl<DeliverySetFeeDao, DeliverySetFee> implements DeliverySetFeeService {
|
||||
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package com.zbkj.service.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zbkj.common.model.deliveryset.DeliverySetTime;
|
||||
import com.zbkj.service.dao.DeliverySetTimeDao;
|
||||
import com.zbkj.service.service.DeliverySetTimeService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class DeliverySetTimeServiceImpl extends ServiceImpl<DeliverySetTimeDao, DeliverySetTime> implements DeliverySetTimeService {
|
||||
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package com.zbkj.service.service.impl;
|
||||
|
||||
import com.zbkj.common.model.home.HomeProducts;
|
||||
import com.zbkj.service.dao.HomeProductsDao;
|
||||
import com.zbkj.service.service.EbHomeProductsService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
@Service
|
||||
public class EbHomeProductsServiceImpl extends ServiceImpl<HomeProductsDao, HomeProducts> implements EbHomeProductsService {
|
||||
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package com.zbkj.service.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.zbkj.common.model.article.Article;
|
||||
import com.zbkj.common.model.cat.StoreCart;
|
||||
import com.zbkj.common.model.home.Home;
|
||||
import com.zbkj.common.model.home.HomeProducts;
|
||||
import com.zbkj.common.page.CommonPage;
|
||||
import com.zbkj.common.request.*;
|
||||
import com.zbkj.common.response.*;
|
||||
import com.zbkj.common.utils.RedisUtil;
|
||||
import com.zbkj.common.vo.HomeVo;
|
||||
import com.zbkj.service.dao.HomeDao;
|
||||
import com.zbkj.service.dao.HomeProductsDao;
|
||||
import com.zbkj.service.service.EbHomeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Service
|
||||
public class EbHomeServiceImpl extends ServiceImpl<HomeDao, Home> implements EbHomeService {
|
||||
|
||||
@Autowired private RedisUtil redisUtil;
|
||||
@Autowired private HomeDao dao;
|
||||
@Autowired private HomeProductsDao homeProductsDao;
|
||||
|
||||
@Override
|
||||
public List<HomeVo> selectHomeType(Integer homeType, Integer storeId) {
|
||||
String key = "HOME_TYPE_" + homeType + "_" + storeId;
|
||||
String value = "";
|
||||
if (redisUtil.exists(key)) {
|
||||
value = redisUtil.get(key);
|
||||
} else {
|
||||
LambdaQueryWrapper<Home> qHome = new LambdaQueryWrapper<>();
|
||||
qHome.eq(Home::getDelFlag, 1);
|
||||
qHome.eq(Home::getType, homeType);
|
||||
qHome.orderByDesc(Home::getOrderNo);
|
||||
List<Home> hList = dao.selectList(qHome);
|
||||
for (Home home : hList) {
|
||||
LambdaQueryWrapper<HomeProducts> qHomePro = new LambdaQueryWrapper<>();
|
||||
qHomePro.eq(HomeProducts::getHomeId, home.getId());
|
||||
qHomePro.eq(HomeProducts::getDelFlag, 1);
|
||||
qHomePro.orderByDesc(HomeProducts::getOrderNo);
|
||||
List<HomeProducts> hpList = homeProductsDao.selectList(qHomePro);
|
||||
home.setHpList(hpList);
|
||||
}
|
||||
value = JSONObject.toJSONString(hList);
|
||||
redisUtil.set(key, value);
|
||||
}
|
||||
return JSONArray.parseArray(value, HomeVo.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonPage<SetMealResponse> selectPageSetMealType(SetMealRequest entity, PageParamRequest page) {
|
||||
List<SetMealResponse> list = dao.selectPageSetMealType(entity, page);
|
||||
return CommonPage.restPage(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonPage<SetMealFloorResponse> selectPageSetMealFloor(SetMealFloorRequest entity, PageParamRequest page) {
|
||||
List<SetMealFloorResponse> list = dao.selectPageSetMealFloor(entity, page);
|
||||
for (SetMealFloorResponse res : list) {
|
||||
Integer hId = res.getId();
|
||||
PageParamRequest pPage = new PageParamRequest();
|
||||
pPage.setPage(1);
|
||||
pPage.setLimit(6);
|
||||
|
||||
HomeProducts qHp = new HomeProducts();
|
||||
qHp.setHomeId(hId);
|
||||
List<SetMealFloorProResponse> pList = homeProductsDao.selectPageFloorProduct(qHp, pPage);
|
||||
res.setObj(CommonPage.restPage(pList));
|
||||
}
|
||||
return CommonPage.restPage(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonPage<SetMealFloorProResponse> selectPageSetMealFloorPro(SetMealFloorProRequest entity, PageParamRequest page) {
|
||||
HomeProducts qHp = new HomeProducts();
|
||||
qHp.setHomeId(Integer.parseInt(entity.getHomeId()));
|
||||
List<SetMealFloorProResponse> list = homeProductsDao.selectPageFloorProduct(qHp, page);
|
||||
return CommonPage.restPage(list);
|
||||
}
|
||||
|
||||
}
|
@ -6,8 +6,6 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.zbkj.common.constants.*;
|
||||
import com.zbkj.common.exception.CrmebException;
|
||||
import com.zbkj.common.model.bargain.StoreBargain;
|
||||
@ -19,7 +17,6 @@ import com.zbkj.common.model.express.Express;
|
||||
import com.zbkj.common.model.express.ShippingTemplates;
|
||||
import com.zbkj.common.model.express.ShippingTemplatesFree;
|
||||
import com.zbkj.common.model.express.ShippingTemplatesRegion;
|
||||
import com.zbkj.common.model.game.GameTreeProduct;
|
||||
import com.zbkj.common.model.order.StoreOrder;
|
||||
import com.zbkj.common.model.order.StoreOrderInfo;
|
||||
import com.zbkj.common.model.order.StoreOrderStatus;
|
||||
|
21
food-service/src/main/resources/mapper/home/HomeMapper.xml
Normal file
21
food-service/src/main/resources/mapper/home/HomeMapper.xml
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zbkj.service.dao.HomeDao">
|
||||
|
||||
<select id="selectPageSetMealType" resultType="com.zbkj.common.response.SetMealResponse">
|
||||
select t.id cid, t.name from (
|
||||
select c.id, c.name, c.sort from eb_home h
|
||||
INNER JOIN eb_home_products hp on h.id = hp.home_id
|
||||
INNER JOIN eb_category c on h.business = c.id
|
||||
where h.del_flag = 1 and hp.del_flag = 1 and h.type = 2
|
||||
group by h.business
|
||||
) t order by t.sort
|
||||
</select>
|
||||
|
||||
<select id="selectPageSetMealFloor" resultType="com.zbkj.common.response.SetMealFloorResponse">
|
||||
select h.id, h.name, h.title, h.direct_url directUrl, h.img_url imgUrl, h.jump_ids jumpIds, h.jump_type jumpType
|
||||
from eb_home h
|
||||
where h.del_flag = 1 and h.type = 2 and h.business = 1 order by h.order_no
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zbkj.service.dao.HomeProductsDao">
|
||||
|
||||
<select id="selectPageFloorProduct" resultType="com.zbkj.common.response.SetMealFloorProResponse">
|
||||
select product_id productId, img_url imgUrl, direct_url directUrl from eb_home_products where home_id = #{entity.homeId} and del_flag = 1 order by order_no
|
||||
</select>
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user