From 2de5cc52d13b116074bd22db67c029a433239233 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 30 Jul 2021 11:28:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=AF=E7=94=A8=E7=88=B6=E9=83=A8=E9=97=A8?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=8E=92=E9=99=A4=E9=A1=B6=E7=BA=A7=E8=8A=82?= =?UTF-8?q?=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 fe885a0c..2b081f9d 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 @@ public class SysDeptServiceImpl implements ISysDeptService 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);