|
|
|
@@ -77,6 +77,7 @@ public class WxCampaignServiceImpl implements WxCampaignService { |
|
|
|
if (wxCouponChannels.size() > 0) { |
|
|
|
for (WxCouponChannel ch : wxCouponChannels) { |
|
|
|
ch.setStatus(EnumCouponChannelStatus.STATUS_TAKE_OFFF.getCode()); |
|
|
|
wxCouponChannels.get(i).setUpdateDate(new Date()); |
|
|
|
wxCouponChannelMapper.updateByPrimaryKeySelective(ch); |
|
|
|
} |
|
|
|
} |
|
|
|
@@ -99,6 +100,7 @@ public class WxCampaignServiceImpl implements WxCampaignService { |
|
|
|
{ |
|
|
|
for (int i = 0; i < wxCouponChannels.size(); i++) { |
|
|
|
wxCouponChannels.get(i).setStatus(EnumCouponChannelStatus.STATUS_TAKE_OFFF.getCode()); |
|
|
|
wxCouponChannels.get(i).setUpdateDate(new Date()); |
|
|
|
wxCouponChannelMapper.updateByPrimaryKeySelective(wxCouponChannels.get(i)); |
|
|
|
} |
|
|
|
|
|
|
|
@@ -118,19 +120,20 @@ public class WxCampaignServiceImpl implements WxCampaignService { |
|
|
|
throw new MallinkException(ErrorCode.COUPON_IS_TAKE_OFF); |
|
|
|
} |
|
|
|
|
|
|
|
if(wxCouponChannels.size()>0) { |
|
|
|
for (int i = 0; i < wxCouponChannels.size(); i++) { |
|
|
|
if (wxCouponChannels.get(i).getId().longValue() == couponId.longValue()) { |
|
|
|
wxCouponChannels.get(i).setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode()); |
|
|
|
wxCouponChannels.get(i).setBeginTime(record.getValidStartDate()); |
|
|
|
wxCouponChannels.get(i).setEndTime(record.getValidEndDate()); |
|
|
|
wxCouponChannelMapper.updateByPrimaryKeySelective(wxCouponChannels.get(i)); |
|
|
|
wxCouponChannels.remove(i); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
for (int i = 0; i < wxCouponChannels.size(); i++) { |
|
|
|
if (wxCouponChannels.get(i).getCouponId().longValue() == couponId.longValue()) { |
|
|
|
wxCouponChannels.get(i).setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode()); |
|
|
|
wxCouponChannels.get(i).setBeginTime(record.getValidStartDate()); |
|
|
|
wxCouponChannels.get(i).setEndTime(record.getValidEndDate()); |
|
|
|
wxCouponChannels.get(i).setUpdateDate(new Date()); |
|
|
|
wxCouponChannelMapper.updateByPrimaryKeySelective(wxCouponChannels.get(i)); |
|
|
|
wxCouponChannels.remove(i); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
WxCouponChannel wxCouponChannel = new WxCouponChannel(); |
|
|
|
wxCouponChannel.setBeginTime(record.getValidStartDate()); |
|
|
|
wxCouponChannel.setEndTime(record.getValidEndDate()); |
|
|
|
|