sql
This commit is contained in:
parent
717ccbe18f
commit
ea8265da5e
|
|
@ -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}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue