|
|
@@ -141,10 +141,10 @@ public class WxCampaignServiceImpl implements WxCampaignService { |
|
|
} else { |
|
|
} else { |
|
|
wxCampaignMapper.updateById(wxCampaign); |
|
|
wxCampaignMapper.updateById(wxCampaign); |
|
|
} |
|
|
} |
|
|
if(EnumAppPlat.WX.getCode().equals(wxCampaign.getPlat())){ |
|
|
|
|
|
|
|
|
// if(EnumAppPlat.WX.getCode().equals(wxCampaign.getPlat())){ |
|
|
//type 为固定格式才会有券的信息 才会有投放的问题 |
|
|
//type 为固定格式才会有券的信息 才会有投放的问题 |
|
|
couponInject(wxCampaign); |
|
|
couponInject(wxCampaign); |
|
|
} |
|
|
|
|
|
|
|
|
// } |
|
|
return new ResultData(Result.SUCCESS,"操作成功"); |
|
|
return new ResultData(Result.SUCCESS,"操作成功"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@@ -189,10 +189,10 @@ public class WxCampaignServiceImpl implements WxCampaignService { |
|
|
WxCampaign campaign = wxCampaignMapper.selectById(wxCampaign.getId()); |
|
|
WxCampaign campaign = wxCampaignMapper.selectById(wxCampaign.getId()); |
|
|
this.updateOtherStatus(campaign.getProduceId(),campaign.getStatus(),campaign.getProduceType()); |
|
|
this.updateOtherStatus(campaign.getProduceId(),campaign.getStatus(),campaign.getProduceType()); |
|
|
} |
|
|
} |
|
|
if(EnumAppPlat.WX.getCode().equals(wxCampaign.getPlat())){ |
|
|
|
|
|
|
|
|
// if(EnumAppPlat.WX.getCode().equals(wxCampaign.getPlat())){ |
|
|
//type 为固定格式才会有券的信息 才会有投放的问题 |
|
|
//type 为固定格式才会有券的信息 才会有投放的问题 |
|
|
couponInject(wxCampaign); |
|
|
couponInject(wxCampaign); |
|
|
} |
|
|
|
|
|
|
|
|
// } |
|
|
return new ResultData(Result.SUCCESS, "操作成功"); |
|
|
return new ResultData(Result.SUCCESS, "操作成功"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@@ -234,10 +234,14 @@ public class WxCampaignServiceImpl implements WxCampaignService { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void delBatch(WxCampaign record) { |
|
|
public void delBatch(WxCampaign record) { |
|
|
|
|
|
Integer targetAd = EnumCouponChannelType.COUPON_CHANNEL_ID_CAMPAIN.getCode(); |
|
|
|
|
|
if(EnumAppPlat.TOUTIAO.getCode().equals(record.getPlat())){ |
|
|
|
|
|
targetAd = EnumCouponChannelType.COUPON_CHANNEL_ID_DOUYIN_CAMPAIN.getCode(); |
|
|
|
|
|
} |
|
|
// couponChannel 下架 |
|
|
// couponChannel 下架 |
|
|
WxCouponChannel wxCouponChannelQ = new WxCouponChannel(); |
|
|
WxCouponChannel wxCouponChannelQ = new WxCouponChannel(); |
|
|
wxCouponChannelQ.updateTenantInfo(record); |
|
|
wxCouponChannelQ.updateTenantInfo(record); |
|
|
wxCouponChannelQ.setTargetAd(EnumCouponChannelType.COUPON_CHANNEL_ID_CAMPAIN.getCode()); |
|
|
|
|
|
|
|
|
wxCouponChannelQ.setTargetAd(targetAd); |
|
|
wxCouponChannelQ.setSubTargetId(record.getId()); |
|
|
wxCouponChannelQ.setSubTargetId(record.getId()); |
|
|
wxCouponChannelQ.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode()); |
|
|
wxCouponChannelQ.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode()); |
|
|
List<WxCouponChannel> wxCouponChannels = wxCouponChannelMapper.findList(wxCouponChannelQ); |
|
|
List<WxCouponChannel> wxCouponChannels = wxCouponChannelMapper.findList(wxCouponChannelQ); |
|
|
@@ -251,10 +255,14 @@ public class WxCampaignServiceImpl implements WxCampaignService { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void addOrUpdateBatch(List<String> ids, WxCampaign record) { |
|
|
public void addOrUpdateBatch(List<String> ids, WxCampaign record) { |
|
|
|
|
|
Integer targetAd = EnumCouponChannelType.COUPON_CHANNEL_ID_CAMPAIN.getCode(); |
|
|
|
|
|
if(EnumAppPlat.TOUTIAO.getCode().equals(record.getPlat())){ |
|
|
|
|
|
targetAd = EnumCouponChannelType.COUPON_CHANNEL_ID_DOUYIN_CAMPAIN.getCode(); |
|
|
|
|
|
} |
|
|
// 获取已上架的CouponChannel |
|
|
// 获取已上架的CouponChannel |
|
|
WxCouponChannel wxCouponChannelQ = new WxCouponChannel(); |
|
|
WxCouponChannel wxCouponChannelQ = new WxCouponChannel(); |
|
|
wxCouponChannelQ.updateTenantInfo(record); |
|
|
wxCouponChannelQ.updateTenantInfo(record); |
|
|
wxCouponChannelQ.setTargetAd(EnumCouponChannelType.COUPON_CHANNEL_ID_CAMPAIN.getCode()); |
|
|
|
|
|
|
|
|
wxCouponChannelQ.setTargetAd(targetAd); |
|
|
wxCouponChannelQ.setSubTargetId(record.getId()); |
|
|
wxCouponChannelQ.setSubTargetId(record.getId()); |
|
|
wxCouponChannelQ.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode()); |
|
|
wxCouponChannelQ.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode()); |
|
|
List<WxCouponChannel> wxCouponChannels = wxCouponChannelMapper.findList(wxCouponChannelQ); |
|
|
List<WxCouponChannel> wxCouponChannels = wxCouponChannelMapper.findList(wxCouponChannelQ); |
|
|
@@ -323,6 +331,11 @@ public class WxCampaignServiceImpl implements WxCampaignService { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Integer targetAd = EnumCouponChannelType.COUPON_CHANNEL_ID_CAMPAIN.getCode(); |
|
|
|
|
|
if(EnumAppPlat.TOUTIAO.getCode().equals(record.getPlat())){ |
|
|
|
|
|
targetAd = EnumCouponChannelType.COUPON_CHANNEL_ID_DOUYIN_CAMPAIN.getCode(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 已有的couponChannel, 更新 |
|
|
// 已有的couponChannel, 更新 |
|
|
WxCouponChannel wxCouponChannel = wxCouponChannelsMap.get(couponId); |
|
|
WxCouponChannel wxCouponChannel = wxCouponChannelsMap.get(couponId); |
|
|
if (wxCouponChannel != null) { |
|
|
if (wxCouponChannel != null) { |
|
|
@@ -354,16 +367,19 @@ public class WxCampaignServiceImpl implements WxCampaignService { |
|
|
wxCouponChannel.setCouponId(couponId); |
|
|
wxCouponChannel.setCouponId(couponId); |
|
|
wxCouponChannel.setMakeMerchantId(wxCoupon.getMakeMerchantId()); |
|
|
wxCouponChannel.setMakeMerchantId(wxCoupon.getMakeMerchantId()); |
|
|
wxCouponChannel.setType(wxCoupon.getType()); |
|
|
wxCouponChannel.setType(wxCoupon.getType()); |
|
|
wxCouponChannel.setTargetAd(EnumCouponChannelType.COUPON_CHANNEL_ID_CAMPAIN.getCode()); |
|
|
|
|
|
|
|
|
wxCouponChannel.setTargetAd(targetAd); |
|
|
wxCouponChannel.setBusiness(wxCoupon.getBusiness()); |
|
|
wxCouponChannel.setBusiness(wxCoupon.getBusiness()); |
|
|
wxCouponChannel.setSubBusiness(wxCoupon.getSubBusiness()); |
|
|
wxCouponChannel.setSubBusiness(wxCoupon.getSubBusiness()); |
|
|
wxCouponChannel.setTitle(wxCoupon.getTitle()); |
|
|
wxCouponChannel.setTitle(wxCoupon.getTitle()); |
|
|
|
|
|
wxCouponChannel.setTtSpuId(wxCoupon.getGoodsId()); |
|
|
wxCouponChannel.setSubTargetId(record.getId()); |
|
|
wxCouponChannel.setSubTargetId(record.getId()); |
|
|
final IdWorker idWorker = IdWorker.get(); |
|
|
final IdWorker idWorker = IdWorker.get(); |
|
|
wxCouponChannel.setId(idWorker.nextId()); |
|
|
wxCouponChannel.setId(idWorker.nextId()); |
|
|
wxCouponChannelMapper.insert(wxCouponChannel); |
|
|
wxCouponChannelMapper.insert(wxCouponChannel); |
|
|
|
|
|
|
|
|
wxCouponChannelService.updateQrCode(wxCouponChannel,wxCouponChannel.getId(),wxCouponChannel.getType()); |
|
|
wxCouponChannelService.updateQrCode(wxCouponChannel,wxCouponChannel.getId(),wxCouponChannel.getType()); |
|
|
|
|
|
|
|
|
|
|
|
wxCouponChannelService.spuStatusSyncByCoupon(wxCouponChannel,wxCouponChannel.getCouponId()); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|