From 8f5aeec641d916806553ef9772d55e17e93db150 Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Mon, 15 Jul 2024 18:28:39 +0800
Subject: [PATCH] 代码优化

---
 src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml b/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
index 00cdd1e..ee42f01 100644
--- a/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
+++ b/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
@@ -956,10 +956,12 @@
         jczz_household jh
         LEFT JOIN jczz_doorplate_address jda ON jh.house_code = jda.address_code
         <where>
-            jda.nei_code in
-            <foreach collection="communityCodeList" item="code" open="(" close=")" separator=",">
-                #{code}
-            </foreach>
+            <if test="communityCodeList != null and communityCodeList.size()>0">
+                jda.nei_code in
+                <foreach collection="communityCodeList" item="code" open="(" close=")" separator=",">
+                    #{code}
+                </foreach>
+            </if>
             and jda.doorplate_type = '户室牌'
             AND jh.is_deleted = 0
             <if test="userId != null and roleType == '1'">

--
Gitblit v1.9.3