|
@@ -97,7 +97,14 @@
|
|
u.code from
|
|
u.code from
|
|
sys_user u
|
|
sys_user u
|
|
left join sys_dept d on u.dept_id = d.dept_id
|
|
left join sys_dept d on u.dept_id = d.dept_id
|
|
|
|
+ <if test="roleName != null and roleName != ''">
|
|
|
|
+ left join sys_user_role ur on ur.user_id = u.user_id
|
|
|
|
+ left join sys_role r on ur.role_id = r.role_id
|
|
|
|
+ </if>
|
|
where u.del_flag = '0'
|
|
where u.del_flag = '0'
|
|
|
|
+ <if test="roleName != null and roleName != ''">
|
|
|
|
+ AND r.role_name = #{roleName}
|
|
|
|
+ </if>
|
|
<if test="userName != null and userName != ''">
|
|
<if test="userName != null and userName != ''">
|
|
AND u.user_name like concat('%', #{userName}, '%')
|
|
AND u.user_name like concat('%', #{userName}, '%')
|
|
</if>
|
|
</if>
|