From bd92c2ab5b7baee24cb8204a3856c9de188a4f97 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Mon, 25 Dec 2023 21:53:18 +0800
Subject: [PATCH] 区域查询修改,场所,房屋,住户,租赁,网格信息区域过滤,机构新增区域字段

---
 src/main/java/org/springblade/modules/community/mapper/CommunityMapper.xml |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/main/java/org/springblade/modules/community/mapper/CommunityMapper.xml b/src/main/java/org/springblade/modules/community/mapper/CommunityMapper.xml
index 0b885da..614785d 100644
--- a/src/main/java/org/springblade/modules/community/mapper/CommunityMapper.xml
+++ b/src/main/java/org/springblade/modules/community/mapper/CommunityMapper.xml
@@ -23,16 +23,22 @@
 
     <!--自定义分页列表查询-->
     <select id="selectCommunityPage" resultType="org.springblade.modules.community.vo.CommunityVO">
-        select * from jczz_community
-        where is_deleted = 0
+        select
+        jc.*
+        from jczz_community jc
+        left join blade_region br on br.code = jc.code
+        where jc.is_deleted = 0
         <if test="community.name !=null and community.name!=''">
-            and name like concat('%',#{community.name},'%')
+            and jc.name like concat('%',#{community.name},'%')
         </if>
         <if test="community.code !=null and community.code!=''">
-            and code like concat('%',#{community.code},'%')
+            and jc.code like concat('%',#{community.code},'%')
         </if>
         <if test="community.streetCode !=null and community.streetCode!=''">
-            and street_code like concat('%',#{community.streetCode},'%')
+            and jc.street_code like concat('%',#{community.streetCode},'%')
+        </if>
+        <if test="community.regionCode !=null and community.regionCode !=''">
+            and jc.code like concat('%',#{community.regionCode},'%')
         </if>
     </select>
 

--
Gitblit v1.9.3