From 46f7995983615272a31d09965a86d436e4a9ee4d Mon Sep 17 00:00:00 2001
From: liusuyi <1951119284@qq.com>
Date: 星期四, 08 八月 2024 16:31:16 +0800
Subject: [PATCH] 增加:获取群组详情关联群组人员信息

---
 ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
index 913ec65..5371232 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
@@ -379,4 +379,23 @@
         </foreach>
         and su.status = '0'
     </select>
+
+    <select id="selectUserIdByCarId" resultType="java.lang.String">
+        select user_id from sys_user where dept_id in (
+        with recursive rsd as (
+            select * from sys_dept sd where sd.dept_id = (
+                select dept_id from ard_sy_car where car_id = #{carId})
+            union
+            select psd.* from sys_dept psd inner join rsd on rsd.parent_id = psd.dept_id
+        )
+        select rsd.dept_id from rsd)
+    </select>
+    <select id="selectUsersByIds" parameterType="list" resultType="SysUser">
+        SELECT * FROM sys_user
+        WHERE user_id IN
+        <foreach collection="userIds" item="userId" open="(" close=")" separator=",">
+            #{userId}
+        </foreach>
+    </select>
+
 </mapper> 
\ No newline at end of file

--
Gitblit v1.9.3