diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponIssueMapper.java b/zsw-bxg/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponIssueMapper.java index cfc69148..7820f245 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponIssueMapper.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponIssueMapper.java @@ -25,7 +25,7 @@ import java.util.List; */ @Repository public interface YxStoreCouponIssueMapper extends CoreMapper { - @Select("") List selecCoupontList(Page page,@Param("type") Integer type, diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponUserMapper.java b/zsw-bxg/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponUserMapper.java index caa316c4..e1fd93a5 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponUserMapper.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponUserMapper.java @@ -25,12 +25,12 @@ import java.util.List; @Repository public interface YxStoreCouponUserMapper extends CoreMapper { @Select("select A.id,A.coupon_title as couponTitle,A.coupon_price as couponPrice," + - "A.end_time as endTime,B.use_min_price as useMinPrice,B.type," + + "A.use_end_time as endTime,B.use_min_price as useMinPrice,B.type," + "B.product_id as productId" + " from yx_store_coupon_user A left join yx_store_coupon B " + "on A.cid = B.id " + "where A.status = 0" + - " AND A.end_time > #{now} " + + " AND A.use_end_time > #{now} " + " AND A.uid = #{uid} AND A.use_min_price <= #{price} " + " ORDER BY B.id DESC") List selectCouponList(@Param("now") Date now, @Param("price") double price, diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/evaluation/domain/YxEvaluation.java b/zsw-bxg/src/main/java/co/yixiang/modules/evaluation/domain/YxEvaluation.java index 27892138..a26b79bc 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/evaluation/domain/YxEvaluation.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/evaluation/domain/YxEvaluation.java @@ -41,7 +41,6 @@ public class YxEvaluation implements Serializable { /** 评测视频 */ - @NotBlank private String videoInput; diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java b/zsw-bxg/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java index 89ae38fb..526e7f86 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java @@ -1539,10 +1539,10 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl{ */ void incPayCount(Long uid); + /** + * 更新会员当前成长值 + * @param uid uid + */ + void upGrowth(Long uid); + /** * 减去用户余额 * @param uid uid diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/user/service/dto/YxSystemUserLevelDto.java b/zsw-bxg/src/main/java/co/yixiang/modules/user/service/dto/YxSystemUserLevelDto.java index 26c4b8c3..04d36c24 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/user/service/dto/YxSystemUserLevelDto.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/user/service/dto/YxSystemUserLevelDto.java @@ -52,6 +52,9 @@ public class YxSystemUserLevelDto implements Serializable { /** 会员图标 */ private String icon; + /** 达成当前等级所需成长值 */ + private Integer growthValue; + /** 规则说明 */ private String explain; diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/user/service/dto/YxUserDto.java b/zsw-bxg/src/main/java/co/yixiang/modules/user/service/dto/YxUserDto.java index adcbdfa2..a7c17fa7 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/user/service/dto/YxUserDto.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/user/service/dto/YxUserDto.java @@ -82,6 +82,9 @@ public class YxUserDto implements Serializable { /** 等级 */ private Integer level; + /** 成长值 */ + private Integer growth; + /** 推广元id */ private Long spreadUid; diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/user/service/impl/YxSystemUserLevelServiceImpl.java b/zsw-bxg/src/main/java/co/yixiang/modules/user/service/impl/YxSystemUserLevelServiceImpl.java index 155bc451..0e1ef65f 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/user/service/impl/YxSystemUserLevelServiceImpl.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/user/service/impl/YxSystemUserLevelServiceImpl.java @@ -194,8 +194,9 @@ public class YxSystemUserLevelServiceImpl extends BaseServiceImpl=growthValue){ + this.setUserLevel(uid,nextLevelId); + return true; + } Long finishCount = systemUserTaskService.getTaskComplete(nextLevelId,uid); //目前任务固定,如果增加任务需要自己增加逻辑,目前每个会员任务固定3 diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/user/service/impl/YxUserServiceImpl.java b/zsw-bxg/src/main/java/co/yixiang/modules/user/service/impl/YxUserServiceImpl.java index 62512889..265c8008 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/user/service/impl/YxUserServiceImpl.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/user/service/impl/YxUserServiceImpl.java @@ -85,7 +85,8 @@ public class YxUserServiceImpl extends BaseServiceImpl im @Autowired private UserBillMapper userBillMapper; - + @Autowired + private YxUserService userService; @Autowired private YxSystemUserLevelService systemUserLevelService; @Autowired @@ -126,6 +127,21 @@ public class YxUserServiceImpl extends BaseServiceImpl im yxUserMapper.incPayCount(uid); } + /** + * 更新会员成长值 + * @param uid uid + */ + @Override + public void upGrowth(Long uid) { + //用户累计消费(1元/1成长值) + double sumPrice=storeOrderMapper.sumPrice(uid); + //更新用户当前成长值 + YxUser yxUser = new YxUser(); + yxUser.setUid(uid); + yxUser.setGrowth((int) Math.round(sumPrice)); + userService.updateById(yxUser); + } + /** * 减去用户余额 * @param uid uid diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/user/vo/YxSystemUserLevelQueryVo.java b/zsw-bxg/src/main/java/co/yixiang/modules/user/vo/YxSystemUserLevelQueryVo.java index 4e4f03f2..0de3609e 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/user/vo/YxSystemUserLevelQueryVo.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/user/vo/YxSystemUserLevelQueryVo.java @@ -36,7 +36,6 @@ public class YxSystemUserLevelQueryVo implements Serializable { @ApiModelProperty(value = "有效时间") private Integer validDate; - @ApiModelProperty(value = "会员等级") private Integer grade; @@ -49,6 +48,10 @@ public class YxSystemUserLevelQueryVo implements Serializable { @ApiModelProperty(value = "会员图标") private String icon; + /** 达成当前等级所需成长值 */ + @ApiModelProperty(value = "所需成长值") + private Integer growthValue; + @ApiModelProperty(value = "规则说明") private String explain; diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/user/vo/YxUserQueryVo.java b/zsw-bxg/src/main/java/co/yixiang/modules/user/vo/YxUserQueryVo.java index e8f65504..6b139638 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/user/vo/YxUserQueryVo.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/user/vo/YxUserQueryVo.java @@ -102,6 +102,9 @@ public class YxUserQueryVo implements Serializable { @ApiModelProperty(value = "等级") private Integer level; + @ApiModelProperty(value = "拥有的成长值") + private Integer growth; + @ApiModelProperty(value = "推广元id") private Long spreadUid;