From db321b2c533fef1d5ddba16b3908693cd984cfb9 Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Sat, 23 Nov 2024 16:43:01 +0800
Subject: [PATCH] 添加一个过滤全景的条件

---
 src/main/java/org/springblade/modules/yw/mapper/RescueTeamMapper.xml |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/springblade/modules/yw/mapper/RescueTeamMapper.xml b/src/main/java/org/springblade/modules/yw/mapper/RescueTeamMapper.xml
index 210405d..957e849 100644
--- a/src/main/java/org/springblade/modules/yw/mapper/RescueTeamMapper.xml
+++ b/src/main/java/org/springblade/modules/yw/mapper/RescueTeamMapper.xml
@@ -41,13 +41,16 @@
     <!--自定义分页查询-->
     <select id="getStatisticData" resultType="java.util.Map">
         SELECT
-            case when type=1 then '园区'
-            when type =2 then '企业'
-            end as type,
+            team_name as type,
             count(*) AS num
         FROM
             yw_rescue_team
-        GROUP BY type
+        <where>
+            <if test="rescueTeam.type!=null">
+                and type = #{rescueTeam.type}
+            </if>
+        </where>
+        GROUP BY team_name
     </select>
 
 </mapper>

--
Gitblit v1.9.3