| | |
| | | AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) )) |
| | | </if> |
| | | <!-- 数据范围过滤 --> |
| | | ${params.dataScope} |
| | | <if test="params != null and params.dataScope != null"> |
| | | AND ${params.dataScope} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult"> |
| | |
| | | AND u.phonenumber like concat('%', #{phonenumber}, '%') |
| | | </if> |
| | | <!-- 数据范围过滤 --> |
| | | ${params.dataScope} |
| | | <if test="params != null and params.dataScope != null"> |
| | | AND ${params.dataScope} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult"> |
| | |
| | | AND u.phonenumber like concat('%', #{phonenumber}, '%') |
| | | </if> |
| | | <!-- 数据范围过滤 --> |
| | | ${params.dataScope} |
| | | <if test="params != null and params.dataScope != null"> |
| | | AND ${params.dataScope} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult"> |
| | |
| | | join sys_user_role ur on u.user_id = ur.user_id |
| | | join sys_role r on r.role_id=ur.role_id |
| | | where |
| | | u.user_type = '01' |
| | | u.user_type != '02' |
| | | and r.role_key = #{roleKey} |
| | | and (u.dept_id = #{deptId} or u.dept_id in (SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors))) |
| | | and u.dept_id = #{deptId} |
| | | </select> |
| | | |
| | | </mapper> |