mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
update 可提现金额,减去当天申请金额
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user