扣除库存调整
This commit is contained in:
parent
daf454359f
commit
4caf080397
|
|
@ -236,7 +236,7 @@ public class CartService {
|
|||
private void updateProductStock(TbProduct product, TbProductSkuWithBLOBs productSku, Integer num) {
|
||||
String key = RedisCst.PRODUCT + product.getShopId() + ":product" + product.getId();
|
||||
if (product.getIsDistribute() == 1) {
|
||||
productSkuMapper.updateStockById(product.getId().toString(), num);
|
||||
productMapper.updateStockById(product.getId().toString(), num);
|
||||
} else {
|
||||
key = RedisCst.PRODUCT + product.getShopId() + ":" + productSku.getId();
|
||||
productSkuMapper.updateStockById(productSku.getId().toString(), num);
|
||||
|
|
|
|||
Loading…
Reference in New Issue