diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/service/ProductService.java b/src/main/java/com/chaozhanggui/system/cashierservice/service/ProductService.java index fc725b5..2997138 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/service/ProductService.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/ProductService.java @@ -157,7 +157,7 @@ public class ProductService { public void incrStock(String productId, String skuId, int addNum) { TbProductWithBLOBs product = tbProductMapper.selectByPrimaryKey(Integer.valueOf(productId)); - if (product.getIsDistribute() == 1) { + if (true ||product.getIsDistribute() == 1) { tbProductMapper.incrStock(productId, addNum); }else { tbProductSkuMapper.incrStock(skuId, addNum); @@ -166,7 +166,7 @@ public class ProductService { public void decrStock(String productId, String skuId, int decrNum) { TbProductWithBLOBs product = tbProductMapper.selectByPrimaryKey(Integer.valueOf(productId)); - if (product.getIsDistribute() == 1) { + if (true || product.getIsDistribute() == 1) { if (product.getIsStock() == 1) { if (tbProductMapper.decrStock(productId, decrNum) < 1) { throw new MsgException("库存不足,下单失败");