From 7bc12c8ae5f7793dd4b2d512e830b84739a3a089 Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Fri, 19 Jan 2024 16:22:07 +0800
Subject: [PATCH] 街道身份,只查找该街道下面的业委会
---
src/main/java/org/springblade/modules/system/mapper/RegionMapper.xml | 20 +++++++++++++++-----
1 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/src/main/java/org/springblade/modules/system/mapper/RegionMapper.xml b/src/main/java/org/springblade/modules/system/mapper/RegionMapper.xml
index 0f22ccd..ea9370a 100644
--- a/src/main/java/org/springblade/modules/system/mapper/RegionMapper.xml
+++ b/src/main/java/org/springblade/modules/system/mapper/RegionMapper.xml
@@ -119,12 +119,22 @@
name
FROM blade_region
where 1=1
- and district_code = '361102'
+ and district_code = '361102000000'
<if test="region.parentCode!=null and region.parentCode!=''">
and parent_code = #{region.parentCode}
</if>
- <if test="region.regionCode!=null and region.regionCode!=''">
- and code like concat('%',#{region.regionCode},'%')
+ <if test="isAdministrator==2">
+ <choose>
+ <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
+ and code in
+ <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
+ #{code}
+ </foreach>
+ </when>
+ <otherwise>
+ and code in ('')
+ </otherwise>
+ </choose>
</if>
</select>
@@ -134,7 +144,7 @@
code as id,
parent_code as parentId,
name
- FROM blade_region where district_code = '361102'
+ FROM blade_region where district_code = '361102000000'
and region_level = 4
<if test="regionCode!=null and regionCode!=''">
and code = #{regionCode}
@@ -144,7 +154,7 @@
code as id,
parent_code as parentId,
name
- FROM blade_region where district_code = '361102'
+ FROM blade_region where district_code = '361102000000'
and region_level = 4
<if test="regionCode!=null and regionCode!=''">
and parent_code = #{regionCode}
--
Gitblit v1.9.3