开启库存校验库存数量
This commit is contained in:
parent
62a931145b
commit
743f59d4a3
|
|
@ -443,7 +443,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
|||
throw new BadRequestException("商品不存在或已下架, id: " + addCartDTO.getSkuId());
|
||||
}
|
||||
|
||||
if (product.getStockNumber() < 1) {
|
||||
if (product.getIsStock() != null && product.getIsStock() == 1 &&product.getStockNumber() < 1) {
|
||||
throw new BadRequestException(product.getName() + "商品库存不足");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue