|
|
@@ -1261,9 +1261,9 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
if (stock.getData() == null) {
|
|
|
throw new RuntimeException("未查到库存");
|
|
|
}
|
|
|
- if (stock.getData() != null && stock.getData().getBalanceQuantity().compareTo(item.getOrderQuantity()) < 0) {
|
|
|
+ if (stock.getData() != null && stock.getData().getSurplusRouteQuantity().compareTo(item.getOrderQuantity()) < 0) {
|
|
|
R<GoodsDescVO> goodsMessage = goodsDescClient.selectGoodsMessage(item.getItemId());
|
|
|
- throw new RuntimeException("商品" + goodsMessage.getData().getCname() + "库存不足,可出售库存为:" + stock.getData().getBalanceQuantity());
|
|
|
+ throw new RuntimeException("商品" + goodsMessage.getData().getCname() + "库存不足,可出售库存为:" + stock.getData().getSurplusRouteQuantity());
|
|
|
}
|
|
|
// 更改库存
|
|
|
StockGoodsVO data = stock.getData();
|