Administrator
2021-08-03 372ec8892f5ed3d11736e75abdd7f33ea34e0d2d
src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml
@@ -172,10 +172,14 @@
        FROM
        blade_dept
        WHERE
        parent_id = dept.id and is_deleted = 0
        parent_id = dept.id and dept.is_deleted = 0
        ) AS "has_children"
        FROM
        blade_dept dept
        left join
        blade_user bu
        on
        bu.dept_id = dept.id
        WHERE
        dept.is_deleted = 0
        <if test="type==1">
@@ -185,6 +189,11 @@
        <if test="type==2 or type==3">
            and dept_category=2
            AND dept.parent_id = "1123598813738675201"
        </if>
        <if test="type==4 and jurisdiction!=null and jurisdiction!=''">
            and dept_category=1
            AND dept.parent_id = "1413470343230877697"
            and bu.jurisdiction = #{jurisdiction}
        </if>
        )
@@ -209,6 +218,10 @@
        <if test="type==2 or type==3">
            and dept_category=2
        </if>
        <if test="type==4 and jurisdiction!=null and jurisdiction!=''">
            and dept_category=1
            and bu.jurisdiction = #{jurisdiction}
        </if>
        )
        )c
    </select>