|
|
|
@@ -144,19 +144,19 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public ResultData addBatch(Integer type,String[] ids, String[] channelId, TenantEntity tenantEntity, Date showBeginTime, Date beginTime, Date endTime) { |
|
|
|
public ResultData addBatch(String type,String[] ids, String[] channelId, TenantEntity tenantEntity, Date showBeginTime, Date beginTime, Date endTime) { |
|
|
|
//如果当前版本是推广版,则线上只能有一个拼团,一个砍价 |
|
|
|
WxMall mall = wxMallMapper.getByTenantId(tenantEntity.getTenantId()); |
|
|
|
if (mall.getSaleType().intValue() == 4 ) { |
|
|
|
if (null != type && (type.intValue() == EnumCouponType.COUPON_PRESS.getCode().intValue() |
|
|
|
|| type.intValue() == EnumCouponType.COUPON_GROUP.getCode().intValue())) { |
|
|
|
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(); |
|
|
|
record.updateTenantInfo(tenantEntity); |
|
|
|
record.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode()); |
|
|
|
record.setType(type); |
|
|
|
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,"该版本【拼团】、【砍价】线上只能发布一个。"); |
|
|
|
return new ResultData(ErrorCode.COUPON_CHANNEL_IS_EXISTED.getCode(),"该版本【拼团】、【砍价】线上只能发布一个。"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|