From eb428cb6839049970e67264f4eafc612e5bcaa38 Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期二, 18 三月 2025 15:14:20 +0800
Subject: [PATCH] 修改统计bug

---
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopBalanceStatementController.java |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopBalanceStatementController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopBalanceStatementController.java
index 4d56027..e14d195 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopBalanceStatementController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopBalanceStatementController.java
@@ -259,6 +259,13 @@
                 .between(ShopBalanceStatement::getCreateTime, date.with(LocalTime.MIN), date.with(LocalTime.MAX));
         if (null != shopId && 0 != shopId) {
             queryWrapper.eq(ShopBalanceStatement::getShopId, shopId);
+        }else{
+            List<Integer> shipIds = shopService.list(new LambdaQueryWrapper<Shop>().eq(Shop::getDelFlag, 0)).stream().map(Shop::getId).collect(Collectors.toList());
+            if(shipIds.size() > 0){
+                queryWrapper.in(ShopBalanceStatement::getShopId, shipIds);
+            }else{
+                queryWrapper.eq(ShopBalanceStatement::getShopId, -1);
+            }
         }
         List<ShopBalanceStatement> list = shopBalanceStatementService.list(queryWrapper);
         return R.ok(list);

--
Gitblit v1.7.1