订单分账逻辑

This commit is contained in:
2023-08-26 14:13:36 +08:00
parent 8a2326f300
commit 6a651782d0
2 changed files with 10 additions and 10 deletions

View File

@@ -27,12 +27,12 @@ public class OrderSettleResult {
/** /**
* 确认金额 * 确认金额
*/ */
private String confirm_amt; private String confirmAmt;
/** /**
* 支付确认手续费金额 * 支付确认手续费金额
*/ */
private String fee_amt; private String feeAmt;
/** /**
* 附加说明 * 附加说明

View File

@@ -1107,13 +1107,13 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
// 应清分金额 = 订单产生的电费+服务费实际消费 汇总 // 应清分金额 = 订单产生的电费+服务费实际消费 汇总
shouldClearingAmount = shouldClearingAmount.add(orderBasicInfo.getSettleAmount()); shouldClearingAmount = shouldClearingAmount.add(orderBasicInfo.getSettleAmount());
// 实际清分金额 = 汇付清分接口返回的清分金额 // 实际清分金额 = 汇付清分接口返回的清分金额
actualClearingAmount = actualClearingAmount.add(new BigDecimal(orderSettleResult.getConfirm_amt())); actualClearingAmount = actualClearingAmount.add(new BigDecimal(orderSettleResult.getConfirmAmt()));
// 手续费金额 = 汇付清分接口返回的手续费金额 // 手续费金额 = 汇付清分接口返回的手续费金额
feeAmount = feeAmount.add(new BigDecimal(orderSettleResult.getFee_amt())); feeAmount = feeAmount.add(new BigDecimal(orderSettleResult.getFeeAmt()));
// 可提现金额 = 实际清分金额 - 手续费金额 // 可提现金额 = 实际清分金额 - 手续费金额
withdrawableAmount = withdrawableAmount withdrawableAmount = withdrawableAmount
.add(new BigDecimal(orderSettleResult.getConfirm_amt())) .add(new BigDecimal(orderSettleResult.getConfirmAmt()))
.subtract(new BigDecimal(orderSettleResult.getFee_amt())); .subtract(new BigDecimal(orderSettleResult.getFeeAmt()));
ClearingBillDetail clearingBillDetail = ClearingBillDetail.builder() ClearingBillDetail clearingBillDetail = ClearingBillDetail.builder()
.clearingBillCode(clearingBillCode) .clearingBillCode(clearingBillCode)
@@ -1261,9 +1261,9 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
// 分账接口返回的信息 // 分账接口返回的信息
OrderSettleResult result = new OrderSettleResult(); OrderSettleResult result = new OrderSettleResult();
result.setConfirm_amt(confirmAmt.toString()); result.setConfirmAmt(confirmAmt.toString());
result.setStatus(status); result.setStatus(status);
result.setFee_amt(feeAmt.toString()); result.setFeeAmt(feeAmt.toString());
// result.setDescription(description); // result.setDescription(description);
return result; return result;
} }
@@ -1346,9 +1346,9 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
// 分账接口返回的信息 // 分账接口返回的信息
OrderSettleResult result = new OrderSettleResult(); OrderSettleResult result = new OrderSettleResult();
result.setConfirm_amt(paymentConfirmResponse.getConfirm_amt()); result.setConfirmAmt(paymentConfirmResponse.getConfirm_amt());
result.setStatus(paymentConfirmResponse.getStatus()); result.setStatus(paymentConfirmResponse.getStatus());
result.setFee_amt(paymentConfirmResponse.getFee_amt()); result.setFeeAmt(paymentConfirmResponse.getFee_amt());
// result.setDescription(paymentConfirmResponse.getDescription()); // result.setDescription(paymentConfirmResponse.getDescription());
return result; return result;
} }