From 06b8f63c0603a4ece96e76b996591904be459a65 Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Fri, 12 Jul 2024 10:43:09 +0800
Subject: [PATCH] 线上错误日志bug修复

---
 src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml b/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
index 9fbd3de..34bab98 100644
--- a/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
+++ b/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
@@ -407,10 +407,12 @@
         jczz_house jh
         LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jh.house_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 jh.is_deleted = 0
            <if test="buildingCode != null  and buildingCode != ''">
                and jda.building_code=#{buildingCode}
@@ -870,7 +872,7 @@
             LEFT JOIN jczz_police_affairs_grid jpag on jh.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
             LEFT JOIN jczz_user_house_label juhl ON juhl.house_code = jh.house_code and juhl.lable_type = 2
             where jda.doorplate_type = '户室牌'
-            <if test="communityCodeList != null">
+            <if test="communityCodeList !=null and communityCodeList.size()>0">
                 and jda.nei_code in
                 <foreach collection="communityCodeList" item="code" open="(" close=")" separator=",">
                     #{code}

--
Gitblit v1.9.3