Helius
2022-03-25 0b342b923cbec6ca293a98dd192b40c0fd2c12db
src/main/resources/mapper/system/UserMapper.xml
@@ -53,6 +53,7 @@
        LEFT JOIN t_user_role ur ON (u.user_id = ur.user_id)
        LEFT JOIN t_role r ON r.role_id = ur.role_id
        WHERE 1 = 1
          and u.dept_id is not null
        <if test="user.username != null and user.username != ''">
            AND u.username = #{user.username}
        </if>
@@ -149,4 +150,18 @@
        select user_id userId, dept_id deptId from t_user_data_permission
        where user_id = #{userId}
    </select>
    <select id="selectDappUserInPage" resultType="user">
        select a.*, b.invite_id
        from t_user a
        inner join dapp_user_member_relate b on a.user_id=b.user_id
        <where>
            <if test="user.username != null and user.username != ''">
                AND (a.username = #{user.username} or b.invite_id = #{user.username})
            </if>
            <if test="user.createBy != null and user.createBy != ''">
                AND b.create_user = #{user.createBy}
            </if>
        </where>
    </select>
</mapper>