From b27d06b8f0b805efd16e28fd80a57a0ed8a053ce Mon Sep 17 00:00:00 2001
From: jinlin <jinlin>
Date: 星期三, 21 二月 2024 15:31:31 +0800
Subject: [PATCH] 修改
---
zt/core/src/main/resources/mapper/sys/SysDeptDao.xml | 48 +++++++++++++++++++++++++++---------------------
1 files changed, 27 insertions(+), 21 deletions(-)
diff --git a/zt/core/src/main/resources/mapper/sys/SysDeptDao.xml b/zt/core/src/main/resources/mapper/sys/SysDeptDao.xml
index 0137dac..d83fd79 100644
--- a/zt/core/src/main/resources/mapper/sys/SysDeptDao.xml
+++ b/zt/core/src/main/resources/mapper/sys/SysDeptDao.xml
@@ -4,16 +4,16 @@
<mapper namespace="com.zt.modules.sys.dao.SysDeptDao">
<select id="getAll" resultType="com.zt.core.sys.model.SysDept">
- select a.id as id
- ,a.name as name
- ,a.pid as pid
- ,a.code as code
- ,a.pids as pids
- ,a.IS_COMPANY
- ,a.nature as nature
- ,a.sort as sort
- ,(select t2.name from SYS_DEPT t2 where t2.id=a.pid) parentName
- ,(select t2.name from SYS_DEPT t2 where t2.id = a.pid) companyName
+ select a.id as id
+ , a.name as name
+ , a.pid as pid
+ , a.code as code
+ , a.pids as pids
+ , a.IS_COMPANY
+ , a.nature as nature
+ , a.sort as sort
+ , (select t2.name from SYS_DEPT t2 where t2.id = a.pid) parentName
+ , (select t2.name from SYS_DEPT t2 where t2.id = a.pid) companyName
from SYS_DEPT a
where a.is_delete = 0
order by a.nature, a.sort asc
@@ -50,16 +50,16 @@
<select id="getById" resultType="com.zt.core.sys.model.SysDept">
select a.id
- ,a.name
- ,a.code
- ,a.pid
- ,a.pids
- ,a.nature
- ,a.sort
- ,(select t2.name from SYS_DEPT t2 where t2.id=a.pid) parentName
+ , a.name
+ , a.code
+ , a.pid
+ , a.pids
+ , a.nature
+ , a.sort
+ , (select t2.name from SYS_DEPT t2 where t2.id = a.pid) parentName
from SYS_DEPT a
- where a.is_delete=0
- and a.id = #{value}
+ where a.is_delete = 0
+ and a.id = #{value}
</select>
<select id="getListByParent" resultType="com.zt.core.sys.model.SysDept">
@@ -74,13 +74,19 @@
from SYS_DEPT a
where a.is_delete=0
<if test="pCode != null">
- and pid in (select id from SYS_DEPT where code= #{pCode})
+ and pid in (select id from SYS_DEPT where code= #{pCode})
</if>
<if test="code != null">
- and code= #{code}
+ and code= #{code}
</if>
<if test="pId != null">
and pid = #{pId}
</if>
</select>
+ <select id="getDeptList3" resultType="com.zt.core.sys.model.SysDept">
+ select id, name
+ from sys_dept
+ where IS_COMPANY = 0
+ order by sort
+ </select>
</mapper>
--
Gitblit v1.9.1