This commit is contained in:
ls
2024-10-16 16:01:26 +08:00
parent 7bb433234f
commit 9a56f0363a

View File

@@ -55,12 +55,16 @@
<!-- 根据角色Id查询 -->
<select id="getUserByRoleId" resultType="org.jeecg.modules.system.entity.SysUser">
select * from sys_user where del_flag = 0 and id in (select user_id from sys_user_role where 1=1
select * from sys_user where del_flag = 0 and id in (select ur.user_id from sys_user_role ur
<if test="roleCode!=null and roleCode!=''">
LEFT JOIN sys_role r ON ur.role_id = r.id
</if>
where 1=1
<if test="roleId!=null and roleId!=''">
and role_id = #{roleId}
and ur.role_id = #{roleId}
</if>
<if test="roleCode!=null and roleCode!=''">
and role_code = #{roleCode}
and r.role_code = #{roleCode}
</if>
)
<if test="username!=null and username!=''">