|
|
|
@@ -63,6 +63,11 @@ public class WxCouponController extends BaseController |
|
|
|
page = wxCouponService.listAsPage(wxCoupon, pageNum, pageSize); |
|
|
|
} |
|
|
|
List<WxCoupon> wxCouponList = page.getList(); |
|
|
|
|
|
|
|
if(wxCouponList.isEmpty()){ |
|
|
|
return new ResultData(page); |
|
|
|
} |
|
|
|
|
|
|
|
List<Long> ids = wxCouponList.stream().map(p->p.getId()).collect(Collectors.toList()); |
|
|
|
WxCouponChannel wxCouponChannel = new WxCouponChannel(); |
|
|
|
wxCouponChannel.setTenantId(getTenantId()); |
|
|
|
@@ -77,7 +82,9 @@ public class WxCouponController extends BaseController |
|
|
|
if(groupBy.get(temp.getId())!=null){ |
|
|
|
List<Integer> channels=new ArrayList<>(); |
|
|
|
for (WxCouponChannel tempchannel:groupBy.get(temp.getId())) { |
|
|
|
channels.add(tempchannel.getTargetAd()); |
|
|
|
if(!channels.contains(tempchannel.getTargetAd())) { |
|
|
|
channels.add(tempchannel.getTargetAd()); |
|
|
|
} |
|
|
|
} |
|
|
|
String sss = JSON.toJSONString(channels); |
|
|
|
temp.setChannels(sss); |
|
|
|
@@ -171,7 +178,7 @@ public class WxCouponController extends BaseController |
|
|
|
public ResultData sendList(@ModelAttribute WxCoupon wxCoupon,Integer pageNum, Integer pageSize) { |
|
|
|
if (null == wxCoupon) wxCoupon = new WxCoupon(); |
|
|
|
wxCoupon.setTenantId(getTenantId()); |
|
|
|
wxCoupon.setStatus(1); |
|
|
|
wxCoupon.setStatus(0); |
|
|
|
PageInfo<WxCoupon> page = null; |
|
|
|
page = wxCouponService.findCanSendList(wxCoupon, pageNum, pageSize); |
|
|
|
|
|
|
|
|