疯狂的狮子li
2022-03-03 a54cb7d3e48cdf3adf7e998dc9c91dab4eb4def6
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
@@ -9,6 +9,7 @@
        <result property="deptId" column="dept_id"/>
        <result property="userName" column="user_name"/>
        <result property="nickName" column="nick_name"/>
        <result property="userType" column="user_type"/>
        <result property="email" column="email"/>
        <result property="phonenumber" column="phonenumber"/>
        <result property="sex" column="sex"/>
@@ -50,6 +51,7 @@
               u.dept_id,
               u.user_name,
               u.nick_name,
               u.user_type,
               u.email,
               u.avatar,
               u.phonenumber,
@@ -75,9 +77,9 @@
               r.data_scope,
               r.status as role_status
        from sys_user u
          left join sys_dept d on u.dept_id = d.dept_id
          left join sys_user_role ur on u.user_id = ur.user_id
          left join sys_role r on r.role_id = ur.role_id
            left join sys_dept d on u.dept_id = d.dept_id
            left join sys_user_role ur on u.user_id = ur.user_id
            left join sys_role r on r.role_id = ur.role_id
    </sql>
    <select id="selectPageUserList" parameterType="SysUser" resultMap="SysUserResult">
@@ -107,10 +109,6 @@
        <if test="user.deptId != null and user.deptId != 0">
            AND (u.dept_id = #{user.deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{user.deptId},
            ancestors) ))
        </if>
        <!-- 数据范围过滤 -->
        <if test="user.params.dataScope != null and user.params.dataScope != ''">
            AND ( ${user.params.dataScope} )
        </if>
    </select>
@@ -142,10 +140,6 @@
            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>
        <!-- 数据范围过滤 -->
        <if test="params.dataScope != null and params.dataScope != ''">
            AND ( ${params.dataScope} )
        </if>
    </select>
    <select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
@@ -160,10 +154,6 @@
        </if>
        <if test="user.phonenumber != null and user.phonenumber != ''">
            AND u.phonenumber like concat('%', #{user.phonenumber}, '%')
        </if>
        <!-- 数据范围过滤 -->
        <if test="user.params.dataScope != null and user.params.dataScope != ''">
            AND ( ${user.params.dataScope} )
        </if>
    </select>
@@ -180,10 +170,6 @@
        </if>
        <if test="user.phonenumber != null and user.phonenumber != ''">
            AND u.phonenumber like concat('%', #{user.phonenumber}, '%')
        </if>
        <!-- 数据范围过滤 -->
        <if test="user.params.dataScope != null and user.params.dataScope != ''">
            AND ( ${user.params.dataScope} )
        </if>
    </select>