@@ -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))) {