| | |
| | | select DISTINCT su.*, br.name as roleName from sys_user as su |
| | | left join base_role as br on su.role_id = br.id inner join sys_project as sp on su.id=sp.sys_user_id |
| | | where su.valid_flag = 1 |
| | | <include refid="queryWhereSql"/> |
| | | <if test="department != null and department != ''"> |
| | | and su.department = #{department} |
| | | </if> |
| | | <if test="approverFlag != null"> |
| | | and su.approver_flag = #{approverFlag} |
| | | </if> |
| | | <if test="project != null and project != ''"> |
| | | and (su.project like concat('%',#{project},'%') |
| | | or su.project is null or su.project = '') |
| | | </if> |
| | | order by su.arp ASC |
| | | <if test="first != null and pageSize != null"> |
| | | limit #{first}, #{pageSize} |