From 77fea47f1fa683f9a0356df3d2328e2bb68b28cf Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Thu, 18 Jan 2024 17:56:22 +0800
Subject: [PATCH] 数据过滤调整
---
src/main/java/org/springblade/modules/community/mapper/CommunityMapper.xml | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 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 7d14b62..852a534 100644
--- a/src/main/java/org/springblade/modules/community/mapper/CommunityMapper.xml
+++ b/src/main/java/org/springblade/modules/community/mapper/CommunityMapper.xml
@@ -38,12 +38,22 @@
<if test="community.streetCode !=null and 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>
<if test="community.townName !=null and community.townName !=''">
and br.town_name like concat('%',#{community.townName},'%')
</if>
+ <if test="isAdministrator==2">
+ <choose>
+ <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
+ and jc.code in
+ <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
+ #{code}
+ </foreach>
+ </when>
+ <otherwise>
+ and jc.code in ('')
+ </otherwise>
+ </choose>
+ </if>
</select>
<!--自定义分页列表查询-->
--
Gitblit v1.9.3