|
|
@@ -240,12 +240,12 @@ public class KwoTradeOrderService {
|
|
|
if (Objects.isNull(goods) || !Objects.equals(goods.getStatus(), 1)) {
|
|
|
throw new BusinessException("商品不存在或已下架!");
|
|
|
}
|
|
|
+ if (goods.getAmount().compareTo(amount) < 0) {
|
|
|
+ throw new BusinessException("商品库存不足,请联系供应方!");
|
|
|
+ }
|
|
|
//受理订单不校验预付款限额
|
|
|
if (!isAcceptanceOrder && Objects.equals(trading, DictEnum.TRADE_TYPE_0.getValue()) && price.compareTo(goods.getAdvancePrice()) < 0) {
|
|
|
- throw new BusinessException("采购订单金额不能小于商品最低预付款限额!");
|
|
|
- }
|
|
|
- if (goods.getAmount().compareTo(amount) < 0) {
|
|
|
- throw new BusinessException("商品库存量小于采购数量!");
|
|
|
+ throw new BusinessException("您的订单总额未达到预付限额,请确认");
|
|
|
}
|
|
|
}
|
|
|
|