From 2892b2a80babdde59f8dcf6750b26870a6d6a853 Mon Sep 17 00:00:00 2001 From: heheng <475597332@qq.com> Date: 星期一, 16 六月 2025 14:05:41 +0800 Subject: [PATCH] 部分功能调整 --- multi-system/src/main/resources/mapper/system/SysDeptMapper.xml | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/multi-system/src/main/resources/mapper/system/SysDeptMapper.xml b/multi-system/src/main/resources/mapper/system/SysDeptMapper.xml index 25c1557..acf425c 100644 --- a/multi-system/src/main/resources/mapper/system/SysDeptMapper.xml +++ b/multi-system/src/main/resources/mapper/system/SysDeptMapper.xml @@ -42,24 +42,24 @@ select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader_user_id, d.company_id, d.status, d.del_flag, d.create_by, d.create_time,d.person_num,d.internal_auditors, d.responsibilities,u.name as leader_name,d2.dept_name as parent_name, dr.content ,dr.clause_num from sys_dept d - left join sys_user u on d.leader_user_id = u.user_id + left join sys_user u on d.leader_user_id = u.id left join sys_dept d2 on d.parent_id = d2.dept_id left join sys_dept_responsibility dr on d.dept_id = dr.dept_id and dr.del_flag = '0' and data_type = 2 where d.del_flag = '0' <if test="companyId != null and companyId != 0"> - AND company_id = #{companyId} + AND d.company_id = #{companyId} </if> <if test="deptId != null and deptId != 0"> - AND dept_id = #{deptId} + AND d.dept_id = #{deptId} </if> <if test="parentId != null and parentId != 0"> - AND parent_id = #{parentId} + AND d.parent_id = #{parentId} </if> <if test="deptName != null and deptName != ''"> - AND dept_name like concat('%', #{deptName}, '%') + AND d.dept_name like concat('%', #{deptName}, '%') </if> <if test="status != null and status != ''"> - AND status = #{status} + AND d.status = #{status} </if> order by d.parent_id, d.order_num </select> @@ -131,7 +131,7 @@ and del_flag = '0' limit 1 </select> - <insert id="insertDept" parameterType="com.gkhy.exam.common.domain.entity.SysDept"> + <insert id="insertDept" parameterType="com.gkhy.exam.common.domain.entity.SysDept" useGeneratedKeys="true" keyProperty="deptId"> insert into sys_dept( <if test="deptId != null and deptId != 0">dept_id,</if> <if test="parentId != null and parentId != 0">parent_id,</if> @@ -202,7 +202,7 @@ </update> <delete id="deleteDeptById" parameterType="Long"> - update sys_dept set del_flag = '2' where dept_id = #{deptId} + update sys_dept set del_flag = '1' where dept_id = #{deptId} </delete> </mapper> \ No newline at end of file -- Gitblit v1.9.2