|
|
@@ -708,7 +708,6 @@ public class LiveServiceImpl implements ILiveService
|
|
|
liveDataService.insertLiveData(liveData);
|
|
|
// 优惠券
|
|
|
List<LiveCouponIssueRelation> liveCouponIssueRelations = liveCouponIssueMapper.selectRelationByLiveId(existLiveId);
|
|
|
- Map<Long, LiveCouponIssueRelation> collect = liveCouponIssueRelations.stream().collect(Collectors.toMap(LiveCouponIssueRelation::getGoodsId, Function.identity(), (existing, replacement) -> existing));
|
|
|
// 直播视频
|
|
|
List<LiveVideo> liveVideos = liveVideoService.selectLiveVideosByLiveId(existLiveId);
|
|
|
if (!liveVideos.isEmpty()) {
|
|
|
@@ -822,9 +821,7 @@ public class LiveServiceImpl implements ILiveService
|
|
|
liveGoodsEntity.setCompanyUserId(live.getCompanyUserId());
|
|
|
liveGoodsService.insertLiveGoods(liveGoodsEntity);
|
|
|
// 优惠券
|
|
|
- if (collect.containsKey(liveGoods.getGoodsId())) {
|
|
|
- liveCouponIssueRelations.stream().filter(relation -> relation.getGoodsId().equals(liveGoods.getGoodsId())).findFirst().ifPresent(liveCouponIssueRelation -> liveCouponIssueRelation.setGoodsId(liveGoodsEntity.getGoodsId()));
|
|
|
- }
|
|
|
+ liveCouponIssueRelations.stream().filter(relation -> liveGoods.getGoodsId().equals(relation.getGoodsId())).findFirst().ifPresent(liveCouponIssueRelation -> liveCouponIssueRelation.setGoodsId(liveGoodsEntity.getGoodsId()));
|
|
|
LiveAutoTask liveAutoTask = goodsTaskList.stream().filter(item -> parseIdFromContent(item.getContent(), "goodsId").equals(liveGoods.getGoodsId())).findFirst().orElse(null);
|
|
|
if(liveAutoTask == null) continue;
|
|
|
liveGoods.setGoodsId(liveGoodsEntity.getGoodsId());
|