From 7b6ccd9b22384c1ef2bb8e9f6dfc69010a293dff Mon Sep 17 00:00:00 2001 From: wangzhaoqiang <tjwangzhaoqiang@163.com> Date: 星期六, 14 八月 2021 20:16:48 +0800 Subject: [PATCH] 解决登录后浏览器后台Breadcrumb组件报错 --- ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java index fe885a0..2b081f9 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java @@ -209,7 +209,8 @@ updateDeptChildren(dept.getDeptId(), newAncestors, oldAncestors); } int result = deptMapper.updateDept(dept); - if (UserConstants.DEPT_NORMAL.equals(dept.getStatus())) + if (UserConstants.DEPT_NORMAL.equals(dept.getStatus()) && StringUtils.isNotEmpty(dept.getAncestors()) + && !StringUtils.equals("0", dept.getAncestors())) { // 如果该部门是启用状态,则启用该部门的所有上级部门 updateParentDeptStatusNormal(dept); -- Gitblit v1.9.2