From 392b3e74a52ee77ac9019df28df52e240513463d Mon Sep 17 00:00:00 2001 From: Guoqs <123@jsowell.com> Date: Tue, 18 Nov 2025 14:05:26 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E5=8F=AF=E6=8F=90=E7=8E=B0=E9=87=91?= =?UTF-8?q?=E9=A2=9D=E5=87=8F=E5=8E=BB=E5=BD=93=E5=A4=A9=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E9=87=91=E9=A2=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/jsowell/adapay/service/AdapayService.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/jsowell-pile/src/main/java/com/jsowell/adapay/service/AdapayService.java b/jsowell-pile/src/main/java/com/jsowell/adapay/service/AdapayService.java index 550ba462c..ed1f2b6ae 100644 --- a/jsowell-pile/src/main/java/com/jsowell/adapay/service/AdapayService.java +++ b/jsowell-pile/src/main/java/com/jsowell/adapay/service/AdapayService.java @@ -683,18 +683,26 @@ public class AdapayService { // 在途金额 BigDecimal pendingAmount = BigDecimal.ZERO; + BigDecimal todayWithdrawalAmount = BigDecimal.ZERO; List withdrawInfoVOS = clearingWithdrawInfoService.selectByMerchantId(merchantId); - log.info("==查询提现在途金额param:{}, result:{}", JSON.toJSONString(withdrawInfoVOS), JSON.toJSONString(pendingAmount)); + // log.info("==查询提现在途金额param:{}, result:{}", JSON.toJSONString(withdrawInfoVOS), JSON.toJSONString(pendingAmount)); if (CollectionUtils.isNotEmpty(withdrawInfoVOS)) { pendingAmount = withdrawInfoVOS.stream() .filter(item -> Constants.ZERO.equals(item.getStatusDesc())) .map(WithdrawInfoVO::getCashAmt) .reduce(BigDecimal.ZERO, BigDecimal::add); + + // 查询今天的提现金额 + for (WithdrawInfoVO withdrawInfoVO : withdrawInfoVOS) { + // 如果applicationTime在当天,则加到todayWithdrawalAmount中 + if (DateUtils.isToday(withdrawInfoVO.getApplicationTime())) { + todayWithdrawalAmount = todayWithdrawalAmount.add(withdrawInfoVO.getCashAmt()); + } + } } vo.setPendingAmount(pendingAmount); - // 查询今天的提现金额 - BigDecimal todayWithdrawalAmount = clearingWithdrawInfoService.queryTodayWithdrawalAmount(merchantId); + // BigDecimal todayWithdrawalAmount = clearingWithdrawInfoService.queryTodayWithdrawalAmount(merchantId); // 如果大于0,则重新更新LastAvlBalance if (todayWithdrawalAmount.compareTo(BigDecimal.ZERO) > 0) { vo.setLastAvlBalance(BigDecimal.ZERO.max(vo.getLastAvlBalance().subtract(todayWithdrawalAmount)));