update 保存提现记录

This commit is contained in:
Guoqs
2025-04-02 13:56:08 +08:00
parent 38469d1925
commit d697b5092f
3 changed files with 806 additions and 6 deletions

View File

@@ -811,15 +811,15 @@ public class AdapayService {
throw new BusinessException(ReturnCodeEnum.CODE_ADAPAY_MEMBER_IS_NULL_ERROR);
}
// 提现金额为昨日金额
BigDecimal lastAvlBalance = adapayAccountBalanceVO.getLastAvlBalance();
// 提现金额为昨日金额 withdrawalAmount
BigDecimal withdrawalAmount = adapayAccountBalanceVO.getLastAvlBalance();
// 提现手续费 每笔固定5元 2025年2月13日11点47分手续费改为参数传入
// BigDecimal feeAmt = new BigDecimal("5");
BigDecimal feeAmt = new BigDecimal(dto.getFeeAmt());
// 实际提现到账金额
BigDecimal cashAmt = lastAvlBalance.subtract(feeAmt);
BigDecimal cashAmt = withdrawalAmount.subtract(feeAmt);
// 可提现金额减去手续费后需大于0
if (cashAmt.compareTo(BigDecimal.ZERO) <= 0) {
@@ -859,7 +859,7 @@ public class AdapayService {
record.setWithdrawCode(id);
record.setOrderNo(orderNo);
record.setWithdrawStatus(Constants.ZERO);
record.setWithdrawAmt(adapayAccountBalanceVO.getAvlBalance()); // 申请提现金额
record.setWithdrawAmt(withdrawalAmount); // 申请提现金额
record.setFeeAmt(feeAmt); // 提现手续费
record.setCreditedAmt(cashAmt); // 到账金额
Date now = new Date();