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/system/mapper/RoleMapper.xml |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/main/java/org/springblade/modules/system/mapper/RoleMapper.xml b/src/main/java/org/springblade/modules/system/mapper/RoleMapper.xml
index c957454..f702df4 100644
--- a/src/main/java/org/springblade/modules/system/mapper/RoleMapper.xml
+++ b/src/main/java/org/springblade/modules/system/mapper/RoleMapper.xml
@@ -53,12 +53,18 @@
         role_alias
         FROM
         blade_role
-        WHERE
-        id IN
-        <foreach collection="array" item="ids" index="index" open="(" close=")" separator=",">
-            #{ids}
-        </foreach>
-        and is_deleted = 0
+        WHERE is_deleted = 0
+        <choose>
+            <when test="array!=null and array.length>0">
+                and id IN
+                <foreach collection="array" item="ids" index="index" open="(" close=")" separator=",">
+                    #{ids}
+                </foreach>
+            </when>
+            <otherwise>
+                and id IN ('')
+            </otherwise>
+        </choose>
     </select>
     <select id="getRoleListByIds" resultType="org.springblade.modules.system.entity.Role">
         SELECT * FROM BLADE_ROLE

--
Gitblit v1.9.3