update 订单金额不能超过支付金额

This commit is contained in:
2023-08-23 17:44:22 +08:00
parent 9d258620bc
commit 9ee2dcef84

View File

@@ -693,7 +693,6 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
} }
// 消费金额就是订单总金额 // 消费金额就是订单总金额
BigDecimal orderAmount = new BigDecimal(data.getConsumptionAmount()); BigDecimal orderAmount = new BigDecimal(data.getConsumptionAmount());
orderBasicInfo.setOrderAmount(orderAmount); // 订单总金额
// 付款金额 - 实际消费金额,如果有剩余,需要走退款操作 当使用余额支付时payAmount = principalPay + giftPay // 付款金额 - 实际消费金额,如果有剩余,需要走退款操作 当使用余额支付时payAmount = principalPay + giftPay
BigDecimal payAmount = orderBasicInfo.getPayAmount(); BigDecimal payAmount = orderBasicInfo.getPayAmount();
@@ -704,6 +703,8 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
orderAmount = payAmount; orderAmount = payAmount;
} }
orderBasicInfo.setOrderAmount(orderAmount); // 订单总金额
// 虚拟金额 指订单消费中不参与结算的部分 // 虚拟金额 指订单消费中不参与结算的部分
BigDecimal virtualAmount = BigDecimal.ZERO; BigDecimal virtualAmount = BigDecimal.ZERO;
if (OrderPayModeEnum.PAYMENT_OF_WHITELIST.getValue().equals(orderBasicInfo.getPayMode())) { if (OrderPayModeEnum.PAYMENT_OF_WHITELIST.getValue().equals(orderBasicInfo.getPayMode())) {