mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-08-16 02:57:33 +08:00
修复在线支付保险订单 payAmount 与 payRecordAmount 不一致
在线支付回调(adapayCallback)中主动将 payAmount 减去了 insuranceAmount 再传给回调, 但 order_pay_record 记录的是完整支付金额,导致校验时 payAmount(扣减后) ≠ payRecordAmount(完整)。 修复: 1. OrderService.adapayCallback: callbackDTO 传完整 amount,同时带上 insuranceAmount 2. payOrderSuccessCallback: 下发桩的启动金额用 payAmount - insuranceAmount 计算, 订单主表 payAmount 仍为完整支付金额,与 payRecordAmount 一致
This commit is contained in:
@@ -5406,8 +5406,12 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
||||
return;
|
||||
}
|
||||
|
||||
// 获取启动金额
|
||||
BigDecimal chargeAmount = computeChargeAmount(orderInfo.getMerchantId(), orderInfo.getStationId(), orderInfo.getMemberId(), dto.getPayAmount());
|
||||
// 获取启动金额:保险金额不计入下发桩的充电额度
|
||||
BigDecimal payAmountForPile = dto.getPayAmount();
|
||||
if (dto.getInsuranceAmount() != null && dto.getInsuranceAmount().compareTo(BigDecimal.ZERO) > 0) {
|
||||
payAmountForPile = dto.getPayAmount().subtract(dto.getInsuranceAmount());
|
||||
}
|
||||
BigDecimal chargeAmount = computeChargeAmount(orderInfo.getMerchantId(), orderInfo.getStationId(), orderInfo.getMemberId(), payAmountForPile);
|
||||
|
||||
// 发送启动指令
|
||||
if (StringUtils.equals(pileConnectorDetailVO.getChargePortType(), Constants.THREE)) {
|
||||
|
||||
Reference in New Issue
Block a user