From 1fd37d0629c3b0fe17302b2cabd4d74ab0fc6dee Mon Sep 17 00:00:00 2001 From: Derran Date: Fri, 6 Dec 2024 10:37:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E7=9B=8A=E6=98=8E=E7=BB=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../walletaccount/user/response/UserGetWalletAccountVo.java | 3 +++ .../walletaccount/impl/WalletAccountQueryServiceImpl.java | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dating-agency-mall-server/src/main/java/com/qniao/dam/api/query/walletaccount/user/response/UserGetWalletAccountVo.java b/dating-agency-mall-server/src/main/java/com/qniao/dam/api/query/walletaccount/user/response/UserGetWalletAccountVo.java index 08e478e..d722deb 100644 --- a/dating-agency-mall-server/src/main/java/com/qniao/dam/api/query/walletaccount/user/response/UserGetWalletAccountVo.java +++ b/dating-agency-mall-server/src/main/java/com/qniao/dam/api/query/walletaccount/user/response/UserGetWalletAccountVo.java @@ -26,6 +26,9 @@ public class UserGetWalletAccountVo { @ApiModelProperty("可提现金额") private BigDecimal availableWithdrawBalance = BigDecimal.ZERO; + @ApiModelProperty("结算中金额") + private BigDecimal settlementBalance = BigDecimal.ZERO; + @ApiModelProperty("总提现金额") private BigDecimal totalWithdrawBalance = BigDecimal.ZERO; diff --git a/dating-agency-mall-server/src/main/java/com/qniao/dam/query/walletaccount/impl/WalletAccountQueryServiceImpl.java b/dating-agency-mall-server/src/main/java/com/qniao/dam/query/walletaccount/impl/WalletAccountQueryServiceImpl.java index 372b80b..b395cff 100644 --- a/dating-agency-mall-server/src/main/java/com/qniao/dam/query/walletaccount/impl/WalletAccountQueryServiceImpl.java +++ b/dating-agency-mall-server/src/main/java/com/qniao/dam/query/walletaccount/impl/WalletAccountQueryServiceImpl.java @@ -76,6 +76,7 @@ public class WalletAccountQueryServiceImpl implements WalletAccountQueryService .stream().map(WalletAccountRecord::getTradeAmount).reduce(BigDecimal.ZERO, BigDecimal::add)); //可提现金额(参考工资为例,15号后结上一个月之前的,15-1-14则结算前两个月之前的) walletAccountVo.setAvailableWithdrawBalance(countAvailableWithdrawBalance(walletAccount)); + walletAccountVo.setSettlementBalance(walletAccount.getAvailableBalance().subtract(walletAccountVo.getAvailableWithdrawBalance())); } } return walletAccountVo; @@ -133,7 +134,7 @@ public class WalletAccountQueryServiceImpl implements WalletAccountQueryService eVo.setMatchmakerLevelVal(rVo.getMatchmakerLevel().getDesc()); } eVo.setTradeTypeVal(rVo.getTradeType().getDesc()); - eVo.setIsIncome(rVo.getIsIncome()?"收入":"支出"); + eVo.setIsIncome(rVo.getIsIncome() ? "收入" : "支出"); }); list.add(exportVo); }