|
@@ -86,8 +86,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<include refid="selectDeptVo"/>
|
|
<include refid="selectDeptVo"/>
|
|
where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
|
|
where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
- <insert id="insertDept" parameterType="SysDept">
|
|
|
|
|
|
+ <select id="selectDeptFgwList" resultMap="SysDeptResult">
|
|
|
|
+ <include refid="selectDeptVo"/>
|
|
|
|
+ where d.del_flag = '0'
|
|
|
|
+ <if test="deptId != null and deptId != 0">
|
|
|
|
+ AND dept_id = #{deptId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="parentId != null and parentId != 0">
|
|
|
|
+ AND find_in_set(#{parentId}, ancestors)
|
|
|
|
+ </if>
|
|
|
|
+ <if test="deptName != null and deptName != ''">
|
|
|
|
+ AND dept_name like concat('%', #{deptName}, '%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="status != null and status != ''">
|
|
|
|
+ AND status = #{status}
|
|
|
|
+ </if>
|
|
|
|
+ order by d.parent_id, d.order_num
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <insert id="insertDept" parameterType="SysDept">
|
|
insert into sys_dept(
|
|
insert into sys_dept(
|
|
<if test="deptId != null and deptId != 0">dept_id,</if>
|
|
<if test="deptId != null and deptId != 0">dept_id,</if>
|
|
<if test="parentId != null and parentId != 0">parent_id,</if>
|
|
<if test="parentId != null and parentId != 0">parent_id,</if>
|