From 9c60ca4dbaa0d5eda53c68d15ac361f1d3b27837 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Thu, 18 Jan 2024 18:20:21 +0800
Subject: [PATCH] 数据过滤补充

---
 src/main/java/org/springblade/modules/property/mapper/PropertyCapitalApplyMapper.xml |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/springblade/modules/property/mapper/PropertyCapitalApplyMapper.xml b/src/main/java/org/springblade/modules/property/mapper/PropertyCapitalApplyMapper.xml
index 64d6feb..5e42e3e 100644
--- a/src/main/java/org/springblade/modules/property/mapper/PropertyCapitalApplyMapper.xml
+++ b/src/main/java/org/springblade/modules/property/mapper/PropertyCapitalApplyMapper.xml
@@ -53,8 +53,18 @@
                 #{item}
             </foreach>
         </if>
-        <if test="propertyCapitalApply.regionCode != null and propertyCapitalApply.regionCode !='' ">
-            and jd.community_code like concat('%',#{propertyCapitalApply.regionCode},'%')
+        <if test="isAdministrator==2">
+            <choose>
+                <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
+                    and jd.community_code in
+                    <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
+                        #{code}
+                    </foreach>
+                </when>
+                <otherwise>
+                    and jd.community_code in ('')
+                </otherwise>
+            </choose>
         </if>
         order by jpca.create_time desc
     </select>

--
Gitblit v1.9.3