BUG
jiangqs
2023-04-24 aa2eae024f8f251c8e2b9eace5351dea7e315ed7
hrt-modules/hrt-system/src/main/resources/mapper/system/user/SysDeptMapper.xml
@@ -4,7 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hrt.system.mapper.user.SysDeptMapper">
   <resultMap type="SysDept" id="SysDeptResult">
   <resultMap type="com.hrt.system.api.domain.SysDept" id="SysDeptResult">
      <id     property="deptId"     column="dept_id"     />
      <result property="parentId"   column="parent_id"   />
      <result property="ancestors"  column="ancestors"   />
@@ -27,7 +27,7 @@
        from sys_dept d
    </sql>
    
   <select id="selectDeptList" parameterType="SysDept" resultMap="SysDeptResult">
   <select id="selectDeptList" parameterType="com.hrt.system.api.domain.SysDept" resultMap="SysDeptResult">
        <include refid="selectDeptVo"/>
        where d.del_flag = '0'
      <if test="deptId != null and deptId != 0">
@@ -85,7 +85,7 @@
      where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
   </select>
    
    <insert id="insertDept" parameterType="SysDept">
    <insert id="insertDept" parameterType="com.hrt.system.api.domain.SysDept">
       insert into sys_dept(
          <if test="deptId != null and deptId != 0">dept_id,</if>
          <if test="parentId != null and parentId != 0">parent_id,</if>
@@ -113,7 +113,7 @@
       )
   </insert>
   
   <update id="updateDept" parameterType="SysDept">
   <update id="updateDept" parameterType="com.hrt.system.api.domain.SysDept">
       update sys_dept
       <set>
          <if test="parentId != null and parentId != 0">parent_id = #{parentId},</if>