|
@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.fs.common.core.page.PageRequest;
|
|
import com.fs.common.core.page.PageRequest;
|
|
|
|
|
+import com.fs.common.core.redis.service.StockDeductService;
|
|
|
import com.fs.common.exception.base.BaseException;
|
|
import com.fs.common.exception.base.BaseException;
|
|
|
import com.fs.company.mapper.CompanyMapper;
|
|
import com.fs.company.mapper.CompanyMapper;
|
|
|
import com.fs.company.vo.CompanyVO;
|
|
import com.fs.company.vo.CompanyVO;
|
|
@@ -109,6 +110,8 @@ public class LiveServiceImpl implements ILiveService
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private LiveLotteryProductConfMapper liveLotteryProductConfMapper;
|
|
private LiveLotteryProductConfMapper liveLotteryProductConfMapper;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
|
|
+ private StockDeductService stockDeductService;
|
|
|
|
|
+ @Autowired
|
|
|
private FsStoreProductScrmMapper fsStoreProductScrmMapper;
|
|
private FsStoreProductScrmMapper fsStoreProductScrmMapper;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private RedisCache redisCache;
|
|
private RedisCache redisCache;
|
|
@@ -1292,7 +1295,7 @@ public class LiveServiceImpl implements ILiveService
|
|
|
newGoods.setStock(goodsMap.containsKey(liveGoods.getProductId())
|
|
newGoods.setStock(goodsMap.containsKey(liveGoods.getProductId())
|
|
|
? goodsMap.get(liveGoods.getProductId()).getStock() : 0);
|
|
? goodsMap.get(liveGoods.getProductId()).getStock() : 0);
|
|
|
liveGoodsService.insertLiveGoods(newGoods);
|
|
liveGoodsService.insertLiveGoods(newGoods);
|
|
|
-
|
|
|
|
|
|
|
+ stockDeductService.initStock(newGoods.getProductId(), newLiveId, newGoods.getStock().intValue());
|
|
|
goodsIdMapping.put(liveGoods.getGoodsId(), newGoods.getGoodsId());
|
|
goodsIdMapping.put(liveGoods.getGoodsId(), newGoods.getGoodsId());
|
|
|
|
|
|
|
|
// 复制商品推送任务(taskType=1)
|
|
// 复制商品推送任务(taskType=1)
|