|
|
@@ -728,6 +728,7 @@ public class LiveServiceImpl implements ILiveService
|
|
|
List<LiveAutoTask> goodsTaskList = liveAutoTasksList.stream().filter(liveAutoTask -> liveAutoTask.getTaskType() == 1L).collect(Collectors.toList());
|
|
|
List<LiveAutoTask> redTaskList = liveAutoTasksList.stream().filter(liveAutoTask -> liveAutoTask.getTaskType() == 2L).collect(Collectors.toList());
|
|
|
List<LiveAutoTask> lotteryTaskList = liveAutoTasksList.stream().filter(liveAutoTask -> liveAutoTask.getTaskType() == 4L).collect(Collectors.toList());
|
|
|
+ List<LiveAutoTask> addList = new ArrayList<>();
|
|
|
if (!barrageTask.isEmpty()) {
|
|
|
LiveAutoTask liveAutoTaskEntity = new LiveAutoTask();
|
|
|
for (LiveAutoTask liveAutoTask : barrageTask) {
|
|
|
@@ -737,9 +738,17 @@ public class LiveServiceImpl implements ILiveService
|
|
|
liveAutoTaskEntity.setCreateTime(now);
|
|
|
liveAutoTaskEntity.setUpdateTime(now);
|
|
|
liveAutoTaskEntity.setFinishStatus(0L);
|
|
|
- liveAutoTaskService.directInsertLiveAutoTask(liveAutoTaskEntity);
|
|
|
+ addList.add(liveAutoTaskEntity);
|
|
|
+ if (addList.size() > 100) {
|
|
|
+ liveAutoTaskService.batchInsertLiveAutoTask(addList);
|
|
|
+ addList.clear();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+ if (!addList.isEmpty()) {
|
|
|
+ liveAutoTaskService.batchInsertLiveAutoTask(addList);
|
|
|
+ addList.clear();
|
|
|
+ }
|
|
|
//直播间红包配置
|
|
|
List<LiveRedConf> liveRedConfs = liveRedConfService.selectByLiveId(existLiveId);
|
|
|
if (!liveRedConfs.isEmpty()) {
|
|
|
@@ -797,11 +806,13 @@ public class LiveServiceImpl implements ILiveService
|
|
|
liveAutoTaskService.directInsertLiveAutoTask(liveAutoTaskEntity);
|
|
|
}
|
|
|
}
|
|
|
+ LiveGoods queryParam = new LiveGoods();
|
|
|
+ queryParam.setLiveId(existLiveId);
|
|
|
// 直播间商品
|
|
|
- List<LiveGoods> goodsList = liveGoodsService.selectByLiveId(existLiveId);
|
|
|
+ List<LiveGoodsVo> goodsList = liveGoodsService.selectProductListByLiveId(queryParam);
|
|
|
if (!goodsList.isEmpty()) {
|
|
|
LiveGoods liveGoodsEntity = new LiveGoods();
|
|
|
- for (LiveGoods liveGoods : goodsList) {
|
|
|
+ for (LiveGoodsVo liveGoods : goodsList) {
|
|
|
BeanUtils.copyBeanProp(liveGoodsEntity, liveGoods);
|
|
|
liveGoodsEntity.setGoodsId(null);
|
|
|
liveGoodsEntity.setLiveId(newLiveId);
|