From 097a14bada17d8b2bc776ba0d97e6c67bf1eba89 Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Mon, 06 Sep 2021 10:30:49 +0800
Subject: [PATCH] 1.许可模板
---
src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml | 34 ++++++++++++++++++++++++++++++++++
1 files changed, 34 insertions(+), 0 deletions(-)
diff --git a/src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml b/src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml
index af6b05a..b5e210e 100644
--- a/src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml
+++ b/src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml
@@ -37,6 +37,7 @@
<result column="has_children" property="hasChildren"/>
</resultMap>
+
<select id="lazyList" resultMap="deptVOResultMap">
SELECT
dept.* ,
@@ -573,5 +574,38 @@
<insert id="add" parameterType="org.springblade.modules.system.entity.Dept" useGeneratedKeys="true" keyProperty="id">
insert into blade_dept(tenant_id, parent_id,ancestors,dept_category,dept_name) values(#{tenantId}, #{parentId}, #{ancestors}, #{deptCategory}, #{deptName})
</insert>
+ <select id="selectInfo" resultMap="treeNodeResultMap">
+ SELECT
+ DISTINCT
+ 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
+ left join
+ sys_information si
+ on
+ si.departmentid = dept.id
+ WHERE
+ 1=1
+ and dept_category = 1
+ AND dept.is_deleted = 0
+ and dept.id !=1420222961377357825
+ and dept.parent_id!=1420222961377357825
+ </select>
+ <!--查询所有的部门信息-->
+ <select id="selDeptList" resultType="org.springblade.common.vo.DeptVo">
+ select id ,dept_name deptName from blade_dept where is_deleted=0
+ </select>
</mapper>
--
Gitblit v1.9.3