From 8b7258c9427882bb1798f1502eaa35184c6e374e Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Fri, 09 Aug 2024 14:29:18 +0800
Subject: [PATCH] 短信指定楼栋发送

---
 src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml |   23 ++++++++++++-----------
 1 files changed, 12 insertions(+), 11 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 ec09a74..ee42f01 100644
--- a/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
+++ b/src/main/java/org/springblade/modules/house/mapper/HouseholdMapper.xml
@@ -349,11 +349,8 @@
                 and jhs.district_code = #{household.aoiCode}
             </if>
             and jh.is_deleted = 0
-            and jg.grid_code is not null
             order by jh.id desc
         </where>
-
-
     </select>
 
     <select id="getAllHouseHold" resultMap="householdPageAndLabelMap">
@@ -901,10 +898,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 jh.is_deleted = 0
             and jda.doorplate_type = '户室牌'
             <if test="userId != null and roleType == '1'">
@@ -957,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