Răsfoiți Sursa

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

wukai 1 an în urmă
părinte
comite
95060bc402

+ 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>