From a09e361bfcb68a809e9143eca87bed2d66af2216 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Mon, 25 Nov 2024 11:35:23 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/main/java/org/springblade/modules/yw/mapper/FacilityMapper.xml |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/src/main/java/org/springblade/modules/yw/mapper/FacilityMapper.xml b/src/main/java/org/springblade/modules/yw/mapper/FacilityMapper.xml
index 09fd4e2..9c35689 100644
--- a/src/main/java/org/springblade/modules/yw/mapper/FacilityMapper.xml
+++ b/src/main/java/org/springblade/modules/yw/mapper/FacilityMapper.xml
@@ -25,4 +25,34 @@
         select * from yw_facility where is_deleted = 0
     </select>
 
+    <!--三道防线信息查询-->
+    <select id="getFacilityList" resultType="org.springblade.modules.yw.vo.FacilityVO">
+        select
+        yf.*,
+        yfi.name as firmName
+        from yw_facility yf
+        left join yw_firm_info yfi on yfi.id = yf.firm_id and yfi.is_deleted = 0
+        where yf.is_deleted = 0
+        <if test="facility.facLevel!=null">
+            and yf.fac_level = #{facility.facLevel}
+        </if>
+        <if test="facility.firmId!=null">
+            and yf.firm_id = #{facility.firmId}
+        </if>
+    </select>
+
+    <!--三道防线信息查询-->
+    <select id="getTreeFacilityList" resultType="org.springblade.modules.yw.vo.FacilityVO">
+        select
+        yes.id,yes.name,yes.lng,yes.lat,yes.image_url,yes.capacity,yfi.id as firm_id,
+        yfi.name as firmName
+        from yw_emergency_space yes
+        left join yw_firm_info yfi on yfi.id = yes.firm_id and yfi.is_deleted = 0
+        where yes.is_deleted = 0
+        and yes.type = 1
+        <if test="facility.firmId!=null">
+            and yes.firm_id = #{facility.firmId}
+        </if>
+    </select>
+
 </mapper>

--
Gitblit v1.9.3