浏览代码

复制商品数据重置

yuhongqi 1 月之前
父节点
当前提交
b919ca15d1
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      fs-service-system/src/main/java/com/fs/live/service/impl/LiveServiceImpl.java

+ 2 - 1
fs-service-system/src/main/java/com/fs/live/service/impl/LiveServiceImpl.java

@@ -827,6 +827,7 @@ public class LiveServiceImpl implements ILiveService
                 }
                 LiveAutoTask liveAutoTask = goodsTaskList.stream().filter(item -> parseIdFromContent(item.getContent(), "goodsId").equals(liveGoods.getGoodsId())).findFirst().orElse(null);
                 if(liveAutoTask == null) continue;
+                liveGoods.setGoodsId(liveGoodsEntity.getGoodsId());
                 LiveAutoTask liveAutoTaskEntity = new LiveAutoTask();
                 BeanUtils.copyBeanProp(liveAutoTaskEntity, liveAutoTask);
                 liveAutoTaskEntity.setId(null);
@@ -834,7 +835,7 @@ public class LiveServiceImpl implements ILiveService
                 liveAutoTaskEntity.setCreateTime(now);
                 liveAutoTaskEntity.setUpdateTime(now);
                 liveAutoTaskEntity.setFinishStatus(0L);
-                liveAutoTaskEntity.setContent(JSON.toJSONString(liveGoodsEntity));
+                liveAutoTaskEntity.setContent(JSON.toJSONString(liveGoods));
                 liveAutoTaskService.directInsertLiveAutoTask(liveAutoTaskEntity);
 
             }