From b720341b27da54284f844561edfad5dacf13604e Mon Sep 17 00:00:00 2001 From: “djh” <“3298565835@qq.com”> Date: 星期三, 09 七月 2025 08:50:48 +0800 Subject: [PATCH] 修改 --- multi-system/src/main/resources/mapper/system/SysDeptMapper.xml | 35 ++++++++++++++++++++++++++++++++--- 1 files changed, 32 insertions(+), 3 deletions(-) diff --git a/multi-system/src/main/resources/mapper/system/SysDeptMapper.xml b/multi-system/src/main/resources/mapper/system/SysDeptMapper.xml index 951e1c1..02d875f 100644 --- a/multi-system/src/main/resources/mapper/system/SysDeptMapper.xml +++ b/multi-system/src/main/resources/mapper/system/SysDeptMapper.xml @@ -80,8 +80,37 @@ <if test="status != null and status != ''"> AND d.status = #{status} </if> - order by d.order_num,d.parent_id + order by d.order_num </select> + + + <select id="selectDeptListCount" parameterType="com.gkhy.exam.common.domain.entity.SysDept" resultType="int"> + select count(d.dept_id) as total + from sys_dept d + where d.del_flag = '0' + <if test="companyId != null and companyId != 0"> + AND d.company_id = #{companyId} + </if> + <if test="deptType != null and deptType != '' " > + AND d.dept_type = #{deptType} + </if> + <if test="responsType != null and responsType != '' " > + AND d.respons_type = #{responsType} + </if> + <if test="deptId != null and deptId != 0"> + AND d.dept_id = #{deptId} + </if> + <if test="parentId != null and parentId != 0"> + AND d.parent_id = #{parentId} + </if> + <if test="deptName != null and deptName != ''"> + AND d.dept_name like concat('%', #{deptName}, '%') + </if> + <if test="status != null and status != ''"> + AND d.status = #{status} + </if> + </select> + <select id="getOutDeptList" parameterType="com.gkhy.exam.common.domain.entity.SysDept" resultMap="SysDeptResult"> @@ -102,7 +131,7 @@ <if test="status != null and status != ''"> AND status = #{status} </if> - order by d.order_num,d.parent_id + order by d.order_num </select> @@ -114,7 +143,7 @@ <if test="deptCheckStrictly"> and d.dept_id not in (select d.parent_id from sys_dept d inner join sys_role_dept rd on d.dept_id = rd.dept_id and rd.role_id = #{roleId}) </if> - order by d.parent_id, d.order_num + order by d.order_num </select> <select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult"> -- Gitblit v1.9.2