吉安感知网项目-后端
linwei
2026-02-26 7e8562079dff478d83743a28722bdca365a0ed36
用户查询通过 sysType
1 files modified
28 ■■■■■ changed files
drone-service/drone-system/src/main/java/org/sxkj/system/mapper/UserMapper.xml 28 ●●●●● patch | view | raw | blame | history
drone-service/drone-system/src/main/java/org/sxkj/system/mapper/UserMapper.xml
@@ -30,28 +30,35 @@
    <!--用户自定义列表查询(不展示 admin 超级管理员账号)-->
    <select id="selectUserPage" resultMap="userResultMap">
        select * from blade_user where is_deleted = 0
        and id != 1123598821738675201
        SELECT
        u.*,
        GROUP_CONCAT(r.id) AS roleId
        FROM blade_user u
        INNER JOIN blade_role r
        ON FIND_IN_SET(r.id, u.role_id) > 0
        AND r.is_deleted = 0
        WHERE u.is_deleted = 0
        and u.id != 1123598821738675201
        <if test="tenantId!=null and tenantId != ''">
            and tenant_id = #{tenantId}
            and u.tenant_id = #{tenantId}
        </if>
        <if test="user.tenantId!=null and user.tenantId != ''">
            and tenant_id = #{user.tenantId}
            and u.tenant_id = #{user.tenantId}
        </if>
        <if test="user.account!=null and user.account != ''">
            and account = #{user.account}
            and u.account = #{user.account}
        </if>
        <if test="user.realName!=null and user.realName != ''">
            and real_name = #{user.realName}
            and u.real_name = #{user.realName}
        </if>
        <if test="user.userType!=null and user.userType != ''">
            and user_type = #{user.userType}
            and u.user_type = #{user.userType}
        </if>
        <if test="user.sysType!=null and user.sysType != ''">
            and sys_type = #{user.sysType}
            and r.sys_type = #{user.sysType}
        </if>
        <if test="deptIdList!=null and deptIdList.size>0">
            and id in (
            and u.id in (
            SELECT
            user_id
            FROM
@@ -63,7 +70,8 @@
            </foreach>
            )
        </if>
        ORDER BY id
        GROUP BY u.id
        ORDER BY u.id
    </select>
    <select id="getUser" resultMap="userResultMap">