记得上下班打卡 | git大法好,push需谨慎

Commit 4e7bbb31 authored by 张国柄's avatar 张国柄

~bindType:新增领取方式'会员专属';

parent 7fe0eeb8
...@@ -72,7 +72,7 @@ public class CandyMgtCouponBuildParam { ...@@ -72,7 +72,7 @@ public class CandyMgtCouponBuildParam {
@Min(value = 1, message = "发放量不能小于1") @Min(value = 1, message = "发放量不能小于1")
@ApiModelProperty(required = true, value = "发放量", example = "1") @ApiModelProperty(required = true, value = "发放量", example = "1")
private Integer eventAmt; private Integer eventAmt;
@ApiModelProperty(required = false, value = "发放类型[0-保留|1-会员|2-手机号|10-全体用户]", allowableValues = "0,1,2,10") @ApiModelProperty(required = false, value = "发放类型[0-保留|1-会员|2-手机号10-全体用户]", allowableValues = "0,1,2,10")
private Integer eventType; private Integer eventType;
@ApiModelProperty(required = false, value = "`发放类型`为2-手机号时发放手机号以,分隔", example = "18510957291,17701223310") @ApiModelProperty(required = false, value = "`发放类型`为2-手机号时发放手机号以,分隔", example = "18510957291,17701223310")
private String eventLimit; private String eventLimit;
......
...@@ -288,7 +288,6 @@ public class CandyMgtCouponAdminController extends BaseController { ...@@ -288,7 +288,6 @@ public class CandyMgtCouponAdminController extends BaseController {
} }
break; break;
case 3:// 新增券领取类型(3-发放需领取)处理逻辑同(1-发放至用户) case 3:// 新增券领取类型(3-发放需领取)处理逻辑同(1-发放至用户)
case 4:// 新增券领取类型(4-会员专属)处理逻辑同(1-发放至用户)
case 1: case 1:
if (buildParam.getEventType() == 2) {// 指定用户手机号 if (buildParam.getEventType() == 2) {// 指定用户手机号
if (StringUtils.isBlank(buildParam.getEventLimit())) { if (StringUtils.isBlank(buildParam.getEventLimit())) {
...@@ -296,6 +295,7 @@ public class CandyMgtCouponAdminController extends BaseController { ...@@ -296,6 +295,7 @@ public class CandyMgtCouponAdminController extends BaseController {
} }
} }
break; break;
case 4:// 新增券领取类型(4-会员专属)处理逻辑同(2-积分兑换)
case 2:// TODO: 2021/11/9 PM上线前临时加的券领取类型(2-积分兑换) case 2:// TODO: 2021/11/9 PM上线前临时加的券领取类型(2-积分兑换)
buildParam.setEventType(0); buildParam.setEventType(0);
buildParam.setEventLimit(null); buildParam.setEventLimit(null);
......
...@@ -33,6 +33,7 @@ import org.springframework.util.CollectionUtils; ...@@ -33,6 +33,7 @@ import org.springframework.util.CollectionUtils;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.List; import java.util.List;
@Slf4j @Slf4j
...@@ -408,7 +409,8 @@ public class CandyMgtCouponAdminServiceImpl extends ServiceImpl<CandyMgtCouponMa ...@@ -408,7 +409,8 @@ public class CandyMgtCouponAdminServiceImpl extends ServiceImpl<CandyMgtCouponMa
initMgtCoupon.setMcouponId(IDGenerator.nextMilliId()); initMgtCoupon.setMcouponId(IDGenerator.nextMilliId());
initMgtCoupon.setCouponId(initCoupon.getCouponId()); initMgtCoupon.setCouponId(initCoupon.getCouponId());
// initMgtCoupon.setState(0); // initMgtCoupon.setState(0);
initMgtCoupon.setState(initCoupon.getBindType() == 2 ? 1 : 0);// TODO: 2021/11/9 PM上线前临时加的券领取类型(2-积分兑换),这里根据发放类型设置该记录不执行发放 // initMgtCoupon.setState(initCoupon.getBindType() == 2 ? 1 : 0);// TODO: 2021/11/9 PM上线前临时加的券领取类型(2-积分兑换),这里根据发放类型设置该记录不执行发放
initMgtCoupon.setState(Arrays.asList(2, 4).contains(initCoupon.getBindType()) ? 1 : 0);
initMgtCoupon.setEventAmt(parameter.getEventAmt()); initMgtCoupon.setEventAmt(parameter.getEventAmt());
initMgtCoupon.setEventType(parameter.getEventType()); initMgtCoupon.setEventType(parameter.getEventType());
initMgtCoupon.setEventLimit(parameter.getEventLimit()); initMgtCoupon.setEventLimit(parameter.getEventLimit());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment