|
@@ -50,7 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="id != null and id != ''"> and a.code = #{id}</if>
|
|
|
<if test="code != null and code != ''"> and a.code = #{code}</if>
|
|
|
<if test="name != null and name != ''"> and a.name like concat('%', #{name}, '%')</if>
|
|
|
- <if test="parentId != null and parentId != ''"> and a.parent_id = (select id from sys_dept_jl where code = #{parentId} limit 1) </if>
|
|
|
+ <if test="parentId != null and parentId != ''"> and a.parent_id = #{parentId} </if>
|
|
|
<if test="level != null "> and level = #{level}</if>
|
|
|
</where>
|
|
|
order by a.code asc
|
|
@@ -62,7 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="id != null and id != ''"> and a.code = #{id}</if>
|
|
|
<if test="code != null and code != ''"> and a.code = #{code}</if>
|
|
|
<if test="name != null and name != ''"> and a.name like concat('%', #{name}, '%')</if>
|
|
|
- <if test="parentId != null and parentId != ''"> and (select id from sys_dept_jl where code = #{parentId}) = a.parent_id</if>
|
|
|
+ <if test="parentId != null and parentId != ''"> and a.parent_id = #{parentId} </if>
|
|
|
<if test="level != null "> and level = #{level}</if>
|
|
|
</where>
|
|
|
order by a.code asc
|