From abdd896a66eced1355a24ea5eabbee497a745fe5 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期五, 17 五月 2024 20:30:22 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/main/resources/mapper/UserMapper.xml |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/resources/mapper/UserMapper.xml b/src/main/resources/mapper/UserMapper.xml
index 2a28d9a..d7252e5 100644
--- a/src/main/resources/mapper/UserMapper.xml
+++ b/src/main/resources/mapper/UserMapper.xml
@@ -350,8 +350,8 @@
             <if test="userName != null and userName != ''">
                 and real_name like concat('%',#{userName},'%')
             </if>
-            <if test="role != null ">
-                and role= #{role}
+            <if test="role != null and role.size() > 0">
+                and role in <foreach collection="role" item="item" open="(" separator="," close=")"> #{item} </foreach>
             </if>
     </select>
 

--
Gitblit v1.8.0