Browse Source

Merge branch 'release_real_202012' of https://git.malls.iformall.com/server/formallProject into release_real_202012

release_toaliyun_real
xhxu 5 years ago
parent
commit
ebdadcc05f
1 changed files with 22 additions and 3 deletions
  1. +22
    -3
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java

+ 22
- 3
mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java View File

@@ -149,9 +149,10 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {
WxMall mall = wxMallMapper.getByTenantId(tenantEntity.getTenantId());
if (mall.getSaleType().intValue() == 4 ) {
if (null != type && (type.equals(String.valueOf(EnumCouponType.COUPON_PRESS.getCode().intValue()))
|| type.equals(String.valueOf(EnumCouponType.COUPON_GROUP.getCode().intValue())))) {
|| type.equals(String.valueOf(EnumCouponType.COUPON_GROUP.getCode().intValue()))
|| type.equals(String.valueOf(EnumCouponType.COUPON_PREORDER.getCode().intValue())))) {
if (null != ids && ids.length > 1) {
return new ResultData(ErrorCode.COUPON_CHANNEL_IS_EXISTED.getCode(),"该版本【拼团】、【砍价】线上只能投放一个,请勾选一个。");
return new ResultData(ErrorCode.COUPON_CHANNEL_IS_EXISTED.getCode(),"该版本【拼团】、【砍价】、【限时抢购】、【预售】线上只能投放一个,请勾选一个。");
}
WxCouponChannel record = new WxCouponChannel();
@@ -160,9 +161,27 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {
record.setType(Integer.parseInt(type));
List<WxCouponChannelVo> list = wxCouponChannelMapper.findVoList(record);
if (null != list && list.size() > 0 ) {
return new ResultData(ErrorCode.COUPON_CHANNEL_IS_EXISTED.getCode(),"该版本【拼团】、【砍价】线上只能投放一个,已经存在已上线的活动,不能再投放。");
return new ResultData(ErrorCode.COUPON_CHANNEL_IS_EXISTED.getCode(),"该版本【拼团】、【砍价】、【限时抢购】、【预售】线上只能投放一个,已经存在已上线的活动,不能再投放。");
}
}
//限时抢购
if (null != channelId && channelId.length == 1) {
String cid = channelId[0];
if (cid.equals(String.valueOf(EnumCouponChannelType.COUPON_CHANNEL_ID_TIMED.getCode()))) {
if (null != ids && ids.length > 1) {
return new ResultData(ErrorCode.COUPON_CHANNEL_IS_EXISTED.getCode(),"该版本【拼团】、【砍价】、【限时抢购】、【预售】线上只能投放一个,请勾选一个。");
}
WxCouponChannel record = new WxCouponChannel();
record.updateTenantInfo(tenantEntity);
record.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode());
record.setTargetAd(EnumCouponChannelType.COUPON_CHANNEL_ID_TIMED.getCode());
List<WxCouponChannelVo> list = wxCouponChannelMapper.findVoList(record);
if (null != list && list.size() > 0 ) {
return new ResultData(ErrorCode.COUPON_CHANNEL_IS_EXISTED.getCode(),"该版本【拼团】、【砍价】、【限时抢购】、【预售】线上只能投放一个,已经存在已上线的活动,不能再投放。");
}
}
}
}
List<WxCouponChannelAddVo> errorList = new ArrayList<>();


Loading…
Cancel
Save