bugfix 保险分账逻辑

This commit is contained in:
Lemon
2025-09-19 10:08:00 +08:00
parent 4088313277
commit 9d8cf73f92
2 changed files with 7 additions and 4 deletions

View File

@@ -2063,6 +2063,9 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
// 订单信息
OrderBasicInfo orderBasicInfo = afterSettleOrderDTO.getOrderBasicInfo();
// 保险金额(有默认值 0.00
BigDecimal insuranceAmount = orderBasicInfo.getInsuranceAmount();
// 订单是否需要分账, 结算金额必须大于0
if (orderSettleAmount == null || orderSettleAmount.compareTo(BigDecimal.ZERO) <= 0) {
logger.info("realTimeOrderSplit-订单[{}]结算金额[{}]必须大于0", afterSettleOrderDTO.getOrderCode(), orderSettleAmount);
@@ -2104,7 +2107,7 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
PaymentConfirmParam param = PaymentConfirmParam.builder()
.paymentId(paymentId)
.divMemberList(divMemberList)
.confirmAmt(orderSettleAmount)
.confirmAmt(orderSettleAmount.add(insuranceAmount)) // 订单结算金额 + 保险金额
.orderCode(orderCode)
.wechatAppId(appId)
.build();