疯狂的狮子li
2021-12-24 5ca038d888922e93bf45c7bd37f3c6dce849dcff
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
@@ -86,6 +86,9 @@
        sys_user u
        left join sys_dept d on u.dept_id = d.dept_id
        where u.del_flag = '0'
        <if test="user.userId != null and user.userId != 0">
            AND u.user_id = #{user.userId}
        </if>
        <if test="user.userName != null and user.userName != ''">
            AND u.user_name like concat('%', #{user.userName}, '%')
        </if>
@@ -105,10 +108,10 @@
            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>
<!--        &lt;!&ndash; 数据范围过滤 &ndash;&gt;-->
<!--        <if test="user.params.dataScope != null and user.params.dataScope != ''">-->
<!--            AND ( ${user.params.dataScope} )-->
<!--        </if>-->
    </select>
    <select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
@@ -139,10 +142,10 @@
            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>
<!--        &lt;!&ndash; 数据范围过滤 &ndash;&gt;-->
<!--        <if test="params.dataScope != null and params.dataScope != ''">-->
<!--            AND ( ${params.dataScope} )-->
<!--        </if>-->
    </select>
    <select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
@@ -186,12 +189,12 @@
    <select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult">
        <include refid="selectUserVo"/>
        where u.user_name = #{userName}
        where u.del_flag = '0' and u.user_name = #{userName}
    </select>
    <select id="selectUserById" parameterType="Long" resultMap="SysUserResult">
        <include refid="selectUserVo"/>
        where u.user_id = #{userId}
        where u.del_flag = '0' and u.user_id = #{userId}
    </select>