|
|
|
@@ -287,12 +287,21 @@ public class WxCampaignServiceImpl implements WxCampaignService { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
Date beginTime = null; |
|
|
|
Date endTime = null; |
|
|
|
if(wxCoupon.getType().equals(EnumCouponType.COUPON_PREORDER.getCode())){ |
|
|
|
beginTime = wxCoupon.getValidStartDate(); |
|
|
|
}else{ |
|
|
|
beginTime = new Date(); |
|
|
|
} |
|
|
|
endTime = wxCoupon.getValidEndDate(); |
|
|
|
|
|
|
|
// 已有的couponChannel, 更新 |
|
|
|
WxCouponChannel wxCouponChannel = wxCouponChannelsMap.get(couponId); |
|
|
|
if (wxCouponChannel != null) { |
|
|
|
wxCouponChannel.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode()); |
|
|
|
wxCouponChannel.setBeginTime(record.getValidStartDate()); |
|
|
|
wxCouponChannel.setEndTime(record.getValidEndDate()); |
|
|
|
wxCouponChannel.setBeginTime(beginTime); |
|
|
|
wxCouponChannel.setEndTime(endTime); |
|
|
|
wxCouponChannel.setUpdateDate(new Date()); |
|
|
|
wxCouponChannelMapper.updateById(wxCouponChannel); |
|
|
|
wxCouponChannelsMap.remove(couponId); |
|
|
|
@@ -308,8 +317,8 @@ public class WxCampaignServiceImpl implements WxCampaignService { |
|
|
|
if(voList != null && voList.size() > 0){ |
|
|
|
wxCouponChannel.setShowBeginTime(voList.get(0).getShowBeginTime()); |
|
|
|
} |
|
|
|
wxCouponChannel.setBeginTime(record.getValidStartDate()); |
|
|
|
wxCouponChannel.setEndTime(record.getValidEndDate()); |
|
|
|
wxCouponChannel.setBeginTime(beginTime); |
|
|
|
wxCouponChannel.setEndTime(endTime); |
|
|
|
wxCouponChannel.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode()); |
|
|
|
wxCouponChannel.setCouponId(couponId); |
|
|
|
wxCouponChannel.setType(wxCoupon.getType()); |
|
|
|
|