|
|
|
@@ -188,6 +188,18 @@ public class WxCouponServiceImpl implements WxCouponService { |
|
|
|
} |
|
|
|
|
|
|
|
List<Long> ids = wxCouponList.stream().map(p -> p.getId()).collect(toList()); |
|
|
|
|
|
|
|
//处理抖音草稿数据 |
|
|
|
Map<Long ,TtCouponVo> draftStatusMap = new HashMap<>(); |
|
|
|
if(EnumAppPlat.TOUTIAO.getCode().equals(wxCoupon.getPlat())){ |
|
|
|
List<TtCouponVo> draftStatus = wxCouponMapper.findDraftStatus(tenantEntity.getTenantId(),ids); |
|
|
|
for (TtCouponVo vo:draftStatus) { |
|
|
|
draftStatusMap.put(vo.getCouponId(),vo); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WxCouponChannel wxCouponChannel = new WxCouponChannel(); |
|
|
|
wxCouponChannel.updateTenantInfo(wxCoupon); |
|
|
|
wxCouponChannel.setCouponIds(ids); |
|
|
|
@@ -196,7 +208,14 @@ public class WxCouponServiceImpl implements WxCouponService { |
|
|
|
List<WxCouponChannel> list = wxCouponChannelMapper.findList(wxCouponChannel); |
|
|
|
if (!list.isEmpty()) { |
|
|
|
Map<Long, List<WxCouponChannel>> groupBy = list.stream().collect(Collectors.groupingBy(WxCouponChannel::getCouponId)); |
|
|
|
for (WxCoupon temp : wxCouponList) { |
|
|
|
for (WxCoupon temp: wxCouponList) { |
|
|
|
if(!draftStatusMap.isEmpty()){ |
|
|
|
TtCouponVo draft = draftStatusMap.get(temp.getId()); |
|
|
|
if(draft != null){ |
|
|
|
temp.setDraftPoiStatus(draft.getPoiStatus()); |
|
|
|
temp.setDraftStatusDesc(draft.getStatusDesc()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (groupBy.get(temp.getId()) != null) { |
|
|
|
List<Integer> channels = new ArrayList<>(); |
|
|
|
|