소스 검색

修改初始化部门空间相关问题

wukai 1 년 전
부모
커밋
95060bc402
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      doc-system/src/main/resources/mapper/system/SysDeptMapper.xml

+ 1 - 1
doc-system/src/main/resources/mapper/system/SysDeptMapper.xml

@@ -107,7 +107,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="SysDept"  useGeneratedKeys="true" keyProperty="deptId">
         insert into sys_dept(
         <if test="deptId != null and deptId != 0">dept_id,</if>
         <if test="parentId != null and parentId != 0">parent_id,</if>