From 2f26b94c6f845cd32171dc5b97535c27b3757dc9 Mon Sep 17 00:00:00 2001 From: xiaohanzi Date: Fri, 27 Nov 2020 09:05:10 +0800 Subject: [PATCH 1/2] fix bug --- .../iformall/service/impl/WxCouponChannelServiceImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java index e6fbd7044..0a3ab2f43 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java @@ -148,6 +148,10 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { //如果当前版本是推广版,则线上只能有一个拼团,一个砍价 WxMall mall = wxMallMapper.getByTenantId(tenantEntity.getTenantId()); if (mall.getSaleType().intValue() == 4 ) { + if (null != ids && ids.length > 1) { + return new ResultData(ErrorCode.COUPON_CHANNEL_IS_EXISTED.getCode(),"该版本【拼团】、【砍价】线上只能投放一个,请勾选一个。"); + } + if (null != type && (type.equals(String.valueOf(EnumCouponType.COUPON_PRESS.getCode().intValue())) || type.equals(String.valueOf(EnumCouponType.COUPON_GROUP.getCode().intValue())))) { WxCouponChannel record = new WxCouponChannel(); @@ -156,7 +160,7 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { record.setType(Integer.parseInt(type)); List 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(),"该版本【拼团】、【砍价】线上只能投放一个,已经存在已上线的活动,不能再投放。"); } } } From a97f1c30e683e7dc4ab48b10cf5c6689686c7ed3 Mon Sep 17 00:00:00 2001 From: xiaohanzi Date: Fri, 27 Nov 2020 09:12:53 +0800 Subject: [PATCH 2/2] fix bug --- .../iformall/service/impl/WxCouponChannelServiceImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java index 0a3ab2f43..8f7a0c492 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java @@ -148,12 +148,12 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { //如果当前版本是推广版,则线上只能有一个拼团,一个砍价 WxMall mall = wxMallMapper.getByTenantId(tenantEntity.getTenantId()); if (mall.getSaleType().intValue() == 4 ) { - if (null != ids && ids.length > 1) { - return new ResultData(ErrorCode.COUPON_CHANNEL_IS_EXISTED.getCode(),"该版本【拼团】、【砍价】线上只能投放一个,请勾选一个。"); - } - if (null != type && (type.equals(String.valueOf(EnumCouponType.COUPON_PRESS.getCode().intValue())) || type.equals(String.valueOf(EnumCouponType.COUPON_GROUP.getCode().intValue())))) { + 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());