From faf27967a7f94a4ed03a179ec2670031576f4502 Mon Sep 17 00:00:00 2001
From: luofl <1442745593@qq.com>
Date: 星期五, 07 三月 2025 18:41:41 +0800
Subject: [PATCH] 迭代版本:2.28

---
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopWithdrawController.java |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopWithdrawController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopWithdrawController.java
index 873101a..b5ab210 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopWithdrawController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopWithdrawController.java
@@ -131,11 +131,26 @@
         LoginUser loginUser = tokenService.getLoginUser();
         SysUser sysUser = sysUserClient.getSysUser(loginUser.getUserid()).getData();
         Shop byId = shopService.getById(sysUser.getObjectId());
-        List<ShopWithdraw> list = shopWithdrawService.lambdaQuery().eq(ShopWithdraw::getShopId, sysUser.getObjectId())
-                .eq(ShopWithdraw::getAuditStatus, 0).list();
+        List<ShopWithdraw> list = shopWithdrawService.lambdaQuery()
+                .eq(ShopWithdraw::getShopId, sysUser.getObjectId())
+                .list();
+
+
         if (!list.isEmpty()){
-            BigDecimal bigDecimal = list.stream().map(ShopWithdraw::getMoney).reduce(BigDecimal::add).orElse(BigDecimal.ZERO);
+            // 待审核列表
+            List<ShopWithdraw> toBeReviewList = list.stream()
+                    .filter(s -> s.getAuditStatus() == 0)
+                    .collect(Collectors.toList());
+            // 审核通过列表
+            List<ShopWithdraw> passedReviewList = list.stream()
+                    .filter(s -> s.getAuditStatus() == 1)
+                    .collect(Collectors.toList());
+
+            BigDecimal bigDecimal = toBeReviewList.stream().map(ShopWithdraw::getMoney).reduce(BigDecimal::add).orElse(BigDecimal.ZERO);
             byId.setWithdrawAuditMoney(bigDecimal);
+
+            BigDecimal bigDecimal1 = passedReviewList.stream().map(ShopWithdraw::getMoney).reduce(BigDecimal::add).orElse(BigDecimal.ZERO);
+            byId.setWithdrawMoney(bigDecimal1);
         }else {
             byId.setWithdrawAuditMoney(BigDecimal.ZERO);
         }

--
Gitblit v1.7.1