From 23b7e5f8c70e53d920c0577353ccfde5970ac183 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期一, 25 九月 2023 12:42:55 +0800 Subject: [PATCH] update springboot 3.1.3 =. 3.1.4 update springboot-admin 3.1.5 => 3.1.6 update satoken 1.35.0.RC => 1.36.0 update hutool 5.8.20 => 5.8.22 update lombok 1.18.26 => 1.18.30 --- ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysDeptController.java | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysDeptController.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysDeptController.java index 478ac6e..130c0d1 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysDeptController.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysDeptController.java @@ -92,9 +92,12 @@ return R.fail("淇敼閮ㄩ棬'" + dept.getDeptName() + "'澶辫触锛岄儴闂ㄥ悕绉板凡瀛樺湪"); } else if (dept.getParentId().equals(deptId)) { return R.fail("淇敼閮ㄩ棬'" + dept.getDeptName() + "'澶辫触锛屼笂绾ч儴闂ㄤ笉鑳芥槸鑷繁"); - } else if (StringUtils.equals(UserConstants.DEPT_DISABLE, dept.getStatus()) - && deptService.selectNormalChildrenDeptById(deptId) > 0) { - return R.fail("璇ラ儴闂ㄥ寘鍚湭鍋滅敤鐨勫瓙閮ㄩ棬锛�"); + } else if (StringUtils.equals(UserConstants.DEPT_DISABLE, dept.getStatus())) { + if (deptService.selectNormalChildrenDeptById(deptId) > 0) { + return R.fail("璇ラ儴闂ㄥ寘鍚湭鍋滅敤鐨勫瓙閮ㄩ棬!"); + } else if (deptService.checkDeptExistUser(deptId)) { + return R.fail("璇ラ儴闂ㄤ笅瀛樺湪宸插垎閰嶇敤鎴凤紝涓嶈兘绂佺敤!"); + } } return toAjax(deptService.updateDept(dept)); } -- Gitblit v1.9.3