update 可提现金额,减去当天申请金额

This commit is contained in:
Guoqs
2025-11-18 13:33:26 +08:00
parent 277fad8918
commit e778d34941
13 changed files with 2077 additions and 36 deletions

View File

@@ -678,8 +678,8 @@ public class AdapayService {
// if (CollectionUtils.isNotEmpty(withdrawInfoVOS)) {
// totalWithdraw = withdrawInfoVOS.stream().map(WithdrawInfoVO::getCashAmt).reduce(BigDecimal.ZERO, BigDecimal::add);
// }
BigDecimal totalWithdraw = clearingWithdrawInfoService.queryTotalWithdraw(merchantId);
vo.setTotalWithdraw(totalWithdraw);
// BigDecimal totalWithdraw = clearingWithdrawInfoService.queryTotalWithdraw(merchantId);
vo.setTotalWithdraw(clearingWithdrawInfoService.queryTotalWithdraw(merchantId));
// 在途金额
BigDecimal pendingAmount = BigDecimal.ZERO;
@@ -692,6 +692,13 @@ public class AdapayService {
.reduce(BigDecimal.ZERO, BigDecimal::add);
}
vo.setPendingAmount(pendingAmount);
// 查询今天的提现金额
BigDecimal todayWithdrawalAmount = clearingWithdrawInfoService.queryTodayWithdrawalAmount(merchantId);
// 如果大于0则重新更新LastAvlBalance
if (todayWithdrawalAmount.compareTo(BigDecimal.ZERO) > 0) {
vo.setLastAvlBalance(BigDecimal.ZERO.max(vo.getLastAvlBalance().subtract(todayWithdrawalAmount)));
}
return vo;
}

View File

@@ -22,7 +22,7 @@ public class AdapayAccountBalanceVO {
// 冻结余额,当配置了自动结算功能,在每日发起结算时会将可用余额转为冻结金额。该部分金额不允许取现。
private BigDecimal frzBalance;
// 昨日日终余额。
// 昨日日终余额。(页面显示为可提现金额)
private BigDecimal lastAvlBalance;
// 汇付会员id