智慧保安后台管理-验收版本
Administrator
2021-12-01 97ebe4578f2876b73017fa5690f245b762cfe2ae
部门树接口修改
1 files modified
60 ■■■■ changed files
src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml 60 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml
@@ -142,7 +142,7 @@
    <!--懒加载获取部门树形结构(包含用户数据)-->
    <select id="lazyTreeUser" resultMap="treeNodeResultMap">
        select DISTINCT  * from (
            (SELECT
                    (SELECT
              dept.id,
              dept.parent_id,
              dept.dept_name AS title,
@@ -166,36 +166,34 @@
                        dept.is_deleted = 0
                        and si.stats = 2
                        and si.departmentid !=1432626178757275649
                    <if test="parentId!=null and parentId!=0">
                        and si.departmentid = 1111
                    </if>
                        and si.departmentid !=1445980335107002370
                        and si.departmentid !=1442115701350387714
            )
            <if test="parentId!=null and parentId!=0">
                union
                (select
                    bu.id,
                    bu.dept_id  parent_id,
                    real_name AS title,
                    bu.id AS "value",
                    bu.id AS "key",
                    0 as "has_children"
                    from blade_user bu
                                    left join
                                    blade_dept bd
                                    on
                                    bd.id = bu.dept_id
                                    left join
                                    sys_information si
                                    on
                                    si.departmentid = bd.id
                                    where bd.is_deleted = 0
                                    and bu.is_deleted = 0
                                    and bu.`status` =1
                                    and si.stats = 2
                                    and si.departmentid = #{parentId}
                                    and si.departmentid !=1432626178757275649
                )
            </if>
            union
            (select
                bu.id,
                bu.dept_id  parent_id,
                real_name AS title,
                bu.id AS "value",
                bu.id AS "key",
                0 as "has_children"
                from blade_user bu
                                left join
                                blade_dept bd
                                on
                                bd.id = bu.dept_id
                                left join
                                sys_information si
                                on
                                si.departmentid = bd.id
                                where bd.is_deleted = 0
                                and bu.is_deleted = 0
                                and bu.`status` =1
                                and si.stats = 2
                                and si.departmentid !=1432626178757275649
                                and si.departmentid !=1445980335107002370
                                and si.departmentid !=1442115701350387714
            )
        )c
    </select>
@@ -260,7 +258,7 @@
    <!--懒加载获取部门树形结构(包含用户数据)-->
    <select id="lazyTreeUsers" resultType="org.springblade.modules.system.node.TreeNodes" >
        select DISTINCT
        *
            *
        from (
        (SELECT
        dept.id,