|
|
|
@@ -226,7 +226,7 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public ResultData addBatch(String 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,Integer channelPrice,Integer channelStock) { |
|
|
|
//如果当前版本是推广版,则线上只能有一个拼团,一个砍价 |
|
|
|
WxMall mall = wxMallService.getByTenantId(tenantEntity.getTenantId()); |
|
|
|
if (EnumSaleType.WX_ENJOY_TRY.getCode().equals(mall.getSaleType())) { |
|
|
|
@@ -271,7 +271,7 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { |
|
|
|
Integer targetId = Integer.parseInt(targetIdstr); |
|
|
|
for (String couponidstr:ids) { |
|
|
|
Long couponid = Long.parseLong(couponidstr); |
|
|
|
WxCouponChannelAddVo vo = addCouponChannel(couponid,targetId,tenantEntity,showBeginTime,beginTime,endTime); |
|
|
|
WxCouponChannelAddVo vo = addCouponChannel(couponid,targetId,tenantEntity,showBeginTime,beginTime,endTime,channelPrice,channelStock); |
|
|
|
if(!vo.isSuc()){ |
|
|
|
errorList.add(vo); |
|
|
|
} |
|
|
|
@@ -489,7 +489,7 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
public WxCouponChannelAddVo addCouponChannel(Long couponid,Integer channelId, TenantEntity tenantEntity,Date showBeginTime,Date beginTime,Date endTime){ |
|
|
|
public WxCouponChannelAddVo addCouponChannel(Long couponid,Integer channelId, TenantEntity tenantEntity,Date showBeginTime,Date beginTime,Date endTime,Integer channelPrice,Integer channelStock){ |
|
|
|
|
|
|
|
WxCouponChannelAddVo vo = new WxCouponChannelAddVo(); |
|
|
|
|
|
|
|
@@ -534,7 +534,8 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { |
|
|
|
channelId.equals(EnumCouponChannelType.COUPON_CHANNEL_ID_CARD.getCode()) || // 卡频道 |
|
|
|
channelId.equals(EnumCouponChannelType.COUPON_CHANNEL_ID_PRESS.getCode()) || // 砍价 |
|
|
|
channelId.equals(EnumCouponChannelType.COUPON_CHANNEL_ID_ORDER_GROUP.getCode()) || // 拼团 |
|
|
|
channelId.equals(EnumCouponChannelType.COUPON_CHANNEL_ID_CREDIT.getCode()) // 积分商城 |
|
|
|
channelId.equals(EnumCouponChannelType.COUPON_CHANNEL_ID_CREDIT.getCode()) || // 积分商城 |
|
|
|
channelId.equals(EnumCouponChannelType.COUPON_CHANNEL_ID_WXLIVE_LIST.getCode()) //微信直播列表 |
|
|
|
){ |
|
|
|
// 默认投放结束时间为有效时间之后 |
|
|
|
if(wxCoupon.getType().equals(EnumCouponType.COUPON_PREORDER.getCode())){ |
|
|
|
@@ -570,6 +571,8 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { |
|
|
|
wxCouponChannel.setBusiness(wxCoupon.getBusiness()); |
|
|
|
wxCouponChannel.setSubBusiness(wxCoupon.getSubBusiness()); |
|
|
|
wxCouponChannel.setTitle(wxCoupon.getTitle()); |
|
|
|
wxCouponChannel.setChannelPrice(channelPrice); |
|
|
|
wxCouponChannel.setChannelStock(channelStock);; |
|
|
|
ResultData resultData = saveOrUpdate(wxCouponChannel); |
|
|
|
WxCouponChannel channel = (WxCouponChannel)resultData.data; |
|
|
|
vo.setId(channel.getId()); |
|
|
|
|