This commit is contained in:
sxu 2025-02-17 19:37:12 +08:00
parent 717ccbe18f
commit ea8265da5e
1 changed files with 2 additions and 4 deletions

View File

@ -80,11 +80,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="companyId != null and companyId != 0"> <if test="companyId != null and companyId != 0">
AND (find_in_set(#{companyId}, ancestors) or dept_id = #{companyId}) AND (find_in_set(#{companyId}, ancestors) or dept_id = #{companyId})
</if> </if>
<!-- <if test="areaId != null and areaId != 0">-->
<!-- AND (find_in_set(#{areaId}, ancestors) or dept_id = #{areaId})-->
<!-- </if>-->
<if test="deptId != null and deptId != 0"> <if test="deptId != null and deptId != 0">
AND dept_id = #{deptId} AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId},
ancestors) ))
</if> </if>
<if test="parentId != null and parentId != 0"> <if test="parentId != null and parentId != 0">
AND parent_id = #{parentId} AND parent_id = #{parentId}