修复查询用户时未添加岗位筛选条件时查询数据不对

This commit is contained in:
dinggang 2022-04-22 11:37:05 +08:00
parent 53a4af2bb8
commit 93ffea6021
1 changed files with 5 additions and 1 deletions

View File

@ -5,7 +5,11 @@
<select id="getList" resultType="io.renren.modules.sys.entity.SysUserEntity"> <select id="getList" resultType="io.renren.modules.sys.entity.SysUserEntity">
select t1.*, (select t2.name from sys_dept t2 where t2.id=t1.dept_id) deptName select t1.*, (select t2.name from sys_dept t2 where t2.id=t1.dept_id) deptName
from sys_user t1, sys_user_post t3 where t1.id = t3.user_id and t1.super_admin = 0 from sys_user t1
<if test = "postId != null and postId.trim() != '' ">
left join sys_user_post t3 on t1.id = t3.user_id
</if>
where t1.super_admin = 0
<if test="username != null and username.trim() != ''"> <if test="username != null and username.trim() != ''">
and t1.username like #{username} and t1.username like #{username}
</if> </if>