库存不足提示
This commit is contained in:
parent
2688efc638
commit
306eb0fbb2
|
|
@ -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() + "库存不足");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue