Selaa lähdekoodia

部门bug修改

chenjun 1 vuosi sitten
vanhempi
commit
be9616b1a4

+ 3 - 0
zjugis-module-system/zjugis-module-system-biz/src/main/java/com/zjugis/module/system/service/dept/DeptServiceImpl.java

@@ -116,6 +116,9 @@ public class DeptServiceImpl implements DeptService {
         if (dept == null) {
             throw exception(DEPT_PARENT_NOT_EXITS);
         }
+        if (id == null) {
+            return;
+        }
         // 父部门不能是原来的子部门
         List<DeptDO> children = getChildDeptList(id);
         if (children.stream().anyMatch(dept1 -> dept1.getId().equals(parentId))) {