新增一个活动类型
This commit is contained in:
@@ -54,7 +54,7 @@ public class ARPromotionManager {
|
||||
@Transactional(rollbackFor = RuntimeException.class)
|
||||
public Boolean addPromotion(ARPromotionRequest request) {
|
||||
|
||||
Assert.isTrue(request.getBenefitsType()<3,"该宝藏类型还未开启, 敬请期待");
|
||||
Assert.isTrue(request.getBenefitsType() != 3,"该宝藏类型还未开启, 敬请期待");
|
||||
|
||||
Assert.isTrue(arMerchantImgService.count(
|
||||
Wrappers.lambdaQuery(ArMerchantImg.class)
|
||||
@@ -68,7 +68,7 @@ public class ARPromotionManager {
|
||||
Assert.notNull(request.getTitle(), "宝藏名称不能为空");
|
||||
switch (request.getBenefitsType()){
|
||||
case 1:
|
||||
Assert.notNull(request.getGivenContent(), "赠品内容不能为空");
|
||||
Assert.notNull(request.getDiscountContent(), "满减内容不能为空");
|
||||
break;
|
||||
case 2:
|
||||
Assert.notNull(request.getDiscountContent(), "折扣内容不能为空");
|
||||
@@ -80,6 +80,10 @@ public class ARPromotionManager {
|
||||
Assert.isTrue(request.getLimitAmount().compareTo(BigDecimal.ZERO) > 0 , "限制金额不能小于0");
|
||||
|
||||
break;
|
||||
|
||||
case 4:
|
||||
Assert.notNull(request.getDiscountContent(), "赠品内容不能为空");
|
||||
break;
|
||||
default:
|
||||
throw new RuntimeException("无效宝藏类型");
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ public class ARPromotionRequest implements Serializable {
|
||||
|
||||
|
||||
/**
|
||||
* 福利类型 1-赠品 2-满折券 3-赠送抵扣券
|
||||
* 福利类型 1-满减 2-折扣 3-推广值 4-赠品
|
||||
*/
|
||||
private Integer benefitsType;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user