|
|
|
@@ -141,13 +141,13 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public ResultData addBatch(String[] ids, String[] channelId, TenantEntity tenantEntity, Date beginTime, Date endTime) { |
|
|
|
public ResultData addBatch(String[] ids, String[] channelId, TenantEntity tenantEntity, Date showBeginTime, Date beginTime, Date endTime) { |
|
|
|
List<WxCouponChannelAddVo> errorList = new ArrayList<>(); |
|
|
|
for (String targetIdstr:channelId) { |
|
|
|
Integer targetId = Integer.parseInt(targetIdstr); |
|
|
|
for (String couponidstr:ids) { |
|
|
|
Long couponid = Long.parseLong(couponidstr); |
|
|
|
WxCouponChannelAddVo vo = addCouponChannel(couponid,targetId,tenantEntity,beginTime,endTime); |
|
|
|
WxCouponChannelAddVo vo = addCouponChannel(couponid,targetId,tenantEntity,showBeginTime,beginTime,endTime); |
|
|
|
if(!vo.isSuc()){ |
|
|
|
errorList.add(vo); |
|
|
|
} |
|
|
|
@@ -210,7 +210,7 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
public WxCouponChannelAddVo addCouponChannel(Long couponid,Integer channelId, TenantEntity tenantEntity,Date beginTime,Date endTime){ |
|
|
|
public WxCouponChannelAddVo addCouponChannel(Long couponid,Integer channelId, TenantEntity tenantEntity,Date showBeginTime,Date beginTime,Date endTime){ |
|
|
|
|
|
|
|
WxCouponChannelAddVo vo = new WxCouponChannelAddVo(); |
|
|
|
|
|
|
|
@@ -271,6 +271,11 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { |
|
|
|
} |
|
|
|
|
|
|
|
WxCouponChannel wxCouponChannel = new WxCouponChannel(); |
|
|
|
if(showBeginTime == null){ |
|
|
|
wxCouponChannel.setShowBeginTime(new Date()); |
|
|
|
}else { |
|
|
|
wxCouponChannel.setShowBeginTime(showBeginTime); |
|
|
|
} |
|
|
|
wxCouponChannel.setEndTime(endTime); |
|
|
|
wxCouponChannel.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode()); |
|
|
|
wxCouponChannel.setBeginTime(beginTime); |
|
|
|
|