reg_dict
This commit is contained in:
parent
d75ff9082d
commit
7d8779947f
@ -75,11 +75,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectChildrenDeptById" parameterType="Long" resultMap="SysDeptResult">
|
<select id="selectChildrenDeptById" parameterType="Long" resultMap="SysDeptResult">
|
||||||
select * from sys_dept where dbo.find_in_set(#{deptId}, ancestors) > 0
|
select * from sys_dept where CHARINDEX( ','+CONVERT(varchar(100),#{deptId})+',', ','+ancestors+',')>0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectNormalChildrenDeptById" parameterType="Long" resultType="int">
|
<select id="selectNormalChildrenDeptById" parameterType="Long" resultType="int">
|
||||||
select count(*) from sys_dept where status = 0 and del_flag = '0' and dbo.find_in_set(#{deptId}, ancestors) > 0
|
select count(*) from sys_dept where status = 0 and del_flag = '0' and CHARINDEX( ','+CONVERT(varchar(100),#{deptId})+',', ','+ancestors+',')>0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="checkDeptNameUnique" resultMap="SysDeptResult">
|
<select id="checkDeptNameUnique" resultMap="SysDeptResult">
|
||||||
|
|||||||
@ -86,7 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
AND u.create_time <= #{params.endTime}
|
AND u.create_time <= #{params.endTime}
|
||||||
</if>
|
</if>
|
||||||
<if test="deptId != null and deptId != 0">
|
<if test="deptId != null and deptId != 0">
|
||||||
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE CHARINDEX( ','+#{deptId}+',', ','+ancestors+',')>0 ))
|
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE CHARINDEX( ','+CONVERT(varchar(100),#{deptId})+',', ','+ancestors+',')>0 ))
|
||||||
</if>
|
</if>
|
||||||
<!-- 数据范围过滤 -->
|
<!-- 数据范围过滤 -->
|
||||||
${params.dataScope}
|
${params.dataScope}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user