|
|
@@ -326,12 +326,13 @@ public class KwoTradeOrderService {
|
|
|
if (goods.getAmount().compareTo(amount) < 0) {
|
|
|
throw new BusinessException("商品库存不足,请联系供应方!");
|
|
|
}
|
|
|
- BigDecimal advancePrice = goods.getAdvancePrice().multiply(new BigDecimal("10000"));
|
|
|
- //直接采购下单才校验预付款限额
|
|
|
- if (Objects.equals(param.getOrderSource(), DictEnum.TORDER_SOURCE_1.getValue()) && trading.startsWith("1") && price.compareTo(advancePrice) < 0) {
|
|
|
- throw new BusinessException("您的订单总额未达到预付限额,请确认");
|
|
|
- }
|
|
|
+ //支付方式预付款校验
|
|
|
if (trading.startsWith("1")) {
|
|
|
+ BigDecimal advancePrice = goods.getAdvancePrice().multiply(new BigDecimal("10000"));
|
|
|
+ //直接采购下单才校验预付款限额
|
|
|
+ if (Objects.equals(param.getOrderSource(), DictEnum.TORDER_SOURCE_1.getValue()) && price.compareTo(advancePrice) < 0) {
|
|
|
+ throw new BusinessException("您的订单总额未达到预付限额,请确认");
|
|
|
+ }
|
|
|
R<List<WalletDto>> wallet = payCenterDubboService.wallet(param.getProcureTopEntId(), ChannelEnum.getByCode(trading), param.getSupplyTopEntId());
|
|
|
if (Objects.isNull(wallet) || Objects.equals(wallet.getCode(), 0)) {
|
|
|
throw new BusinessException("校验预付钱包异常,请联系管理员!");
|