|
@@ -102,7 +102,7 @@ public class LiveGoodsServiceImpl extends ServiceImpl<LiveGoodsMapper, LiveGoods
|
|
|
if(fsStoreProduct == null) return R.error("商品不存在");
|
|
if(fsStoreProduct == null) return R.error("商品不存在");
|
|
|
if(fsStoreProduct.getIsShow() == 0 || existGoods.getStatus() == 0) return R.error("商品已下架");
|
|
if(fsStoreProduct.getIsShow() == 0 || existGoods.getStatus() == 0) return R.error("商品已下架");
|
|
|
if(fsStoreProduct.getStock() < liveGoods.getStock()) return R.error("商品库存不足");
|
|
if(fsStoreProduct.getStock() < liveGoods.getStock()) return R.error("商品库存不足");
|
|
|
- stockDeductService.initStock(existGoods.getProductId(), liveGoods.getLiveId(), liveGoods.getStock().intValue());
|
|
|
|
|
|
|
+ stockDeductService.initStock(existGoods.getProductId(), existGoods.getLiveId(), liveGoods.getStock().intValue());
|
|
|
}
|
|
}
|
|
|
baseMapper.updateLiveGoods(liveGoods);
|
|
baseMapper.updateLiveGoods(liveGoods);
|
|
|
return R.ok();
|
|
return R.ok();
|