diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/reward/vo/RewardActivityBaseVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/reward/vo/RewardActivityBaseVO.java index 0ed4b7d52..7f68ee123 100755 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/reward/vo/RewardActivityBaseVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/reward/vo/RewardActivityBaseVO.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.promotion.controller.admin.reward.vo; import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.util.BooleanUtil; import cn.iocoder.yudao.framework.common.validation.InEnum; import cn.iocoder.yudao.module.promotion.enums.common.PromotionConditionTypeEnum; import cn.iocoder.yudao.module.promotion.enums.common.PromotionProductScopeEnum; @@ -77,24 +76,16 @@ public class RewardActivityBaseVO { @NotNull(message = "规则是否包邮不能为空") private Boolean freeDelivery; - @Schema(description = "是否赠送积分", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") - @NotNull(message = "规则是否赠送积分不能为空") - private Boolean givePoint; - @Schema(description = "赠送的积分", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") private Integer point; - @Schema(description = "是否赠送优惠券", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") - @NotNull(message = "规则是否赠送优惠券不能为空") - private Boolean giveCoupon; - @Schema(description = "赠送的优惠劵编号的数组", example = "1,2,3") private Map giveCouponsMap; @AssertTrue(message = "赠送的积分不能小于 1") @JsonIgnore public boolean isPointValid() { - return BooleanUtil.isFalse(givePoint) || (point != null && point >= 1); + return point == null || point >= 1; } } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/reward/RewardActivityDO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/reward/RewardActivityDO.java index b1332cb3f..f5d60c4e6 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/reward/RewardActivityDO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/reward/RewardActivityDO.java @@ -100,20 +100,10 @@ public class RewardActivityDO extends BaseDO { * 是否包邮 */ private Boolean freeDelivery; - // TODO @puhui999:是不是大于零,就认为赠送积分哈;简洁一点; - /** - * 是否赠送积分 - */ - private Boolean givePoint; /** * 赠送的积分 */ private Integer point; - // TODO @puhui999:非空,就认为赠送优惠劵 - /** - * 是否赠送优惠券 - */ - private Boolean giveCoupon; /** * 赠送的优惠劵 * diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/reward/RewardActivityServiceImpl.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/reward/RewardActivityServiceImpl.java index 1ad0ae48f..d35142c19 100755 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/reward/RewardActivityServiceImpl.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/reward/RewardActivityServiceImpl.java @@ -159,7 +159,6 @@ public class RewardActivityServiceImpl implements RewardActivityService { @Override public List getMatchRewardActivityList(Collection spuIds) { - // TODO 芋艿:待实现;先指定,然后再全局的; List list = rewardActivityMapper.selectListBySpuIdsAndStatus(spuIds, CommonStatusEnum.ENABLE.getStatus()); return BeanUtils.toBean(list, RewardActivityMatchRespDTO.class); }