From 651186d7fce51274500b66d7ed8a53bedc6a1339 Mon Sep 17 00:00:00 2001 From: 艾金辉 <1144154118@qq.com> Date: 星期一, 24 七月 2023 12:47:17 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml index 91528e4..5f916c9 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -120,7 +120,7 @@ <select id="selectAppUserList" parameterType="SysUser" resultMap="SysUserResult"> <include refid="selectUserVo"/> where u.del_flag = '0' - and r.role_name like '%app%' + and LOWER(r.role_name) like '%app%' <if test="deptId != null and deptId != 0"> AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE cast(#{deptId} as varchar) = any(string_to_array(ancestors,',')) )) @@ -283,4 +283,11 @@ </foreach> </delete> + <select id="getSysUserByCarId" parameterType="java.lang.String" resultMap="SysUserResult"> + select * from sys_user su where su.dept_id in ( + select cast(unnest(array_append(string_to_array(sd.ancestors,','), + cast(sd.dept_id as text))) as int) from ard_sy_car asy + inner join sys_dept sd on asy.dept_id = sd.dept_id + where asy.car_id = #{carId}) + </select> </mapper> \ No newline at end of file -- Gitblit v1.9.3