Merge remote-tracking branch 'origin/master'

This commit is contained in:
Tankaikai 2025-04-16 18:34:47 +08:00
commit 9f972c6d28
1 changed files with 1 additions and 1 deletions

View File

@ -463,7 +463,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
.eq(Product::getShopId, detail.getShopId())
.eq(Product::getIsDel, 0)
.eq(Product::getIsStock, 1));
if (product != null && detail.getNum().compareTo(new BigDecimal(product.getStockNumber())) < 0) {
if (product != null && detail.getNum().compareTo(new BigDecimal(product.getStockNumber())) > 0) {
throw new CzgException("下单失败" + product.getName() + "库存不足");
}
}