diff --git a/bonus-modules/bonus-system/src/main/resources/mapper/system/SysDeptMapper.xml b/bonus-modules/bonus-system/src/main/resources/mapper/system/SysDeptMapper.xml index 9ff097e..409c478 100644 --- a/bonus-modules/bonus-system/src/main/resources/mapper/system/SysDeptMapper.xml +++ b/bonus-modules/bonus-system/src/main/resources/mapper/system/SysDeptMapper.xml @@ -80,11 +80,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND (find_in_set(#{companyId}, ancestors) or dept_id = #{companyId}) - - - - 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) )) AND parent_id = #{parentId}