扣除库存调整

This commit is contained in:
SongZhang 2024-06-25 11:08:55 +08:00
parent daf454359f
commit 4caf080397
1 changed files with 1 additions and 1 deletions

View File

@ -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);