洪城义警-正式版后台
zhongrj
2023-11-14 62cd133e894d8cc8d527d5e94a4310794e03f763
src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml
@@ -99,6 +99,43 @@
        ORDER BY dept.sort
    </select>
    <select id="lazyTreeSecurity" resultMap="treeNodeResultMap" >
        select DISTINCT  * from (
            (SELECT
              dept.id,
              dept.parent_id,
              dept.dept_name AS title,
              dept.id AS "value",
              dept.id AS "key",
                        (
                            SELECT
                                CASE WHEN count(1) > 0 THEN 1 ELSE 0 END
                            FROM
                                blade_dept
                            WHERE
                                parent_id = dept.id and is_deleted = 0
                        ) AS "has_children"
                    FROM
                        blade_dept dept
                    WHERE
                        dept.is_deleted = 0
            )
            union
            (select
                id,
                dept_id  parent_id,
                real_name AS title,
                id AS "value",
                id AS "key",
                0 as "has_children"
                from blade_user
            )
        )c
    </select>
    <select id="getDeptNames" resultType="java.lang.String">
        SELECT
        dept_name
@@ -115,6 +152,10 @@
    <!--查询所有的部门信息-->
    <select id="selDeptList" resultType="org.springblade.common.vo.DeptVo">
        select id ,dept_name deptName from blade_dept where is_deleted=0
    </select>
    <select id="selXQList" resultType="org.springblade.common.vo.DeptVo">
        select id ,dept_name deptName from sys_jurisdiction where is_deleted=0
    </select>
@@ -138,11 +179,6 @@
        WHERE
            dept.is_deleted = 0
        ORDER BY dept.sort
    </select>
    <!--查询所有的部门信息-->
    <select id="selDeptList" resultType="org.springblade.common.vo.DeptVo">
        select id ,dept_name deptName from blade_dept where is_deleted=0
    </select>
    <select id="trees" resultMap="treeNodeResultMap">