From ba1a540add437649bae209ba8a8b44f2e2d95451 Mon Sep 17 00:00:00 2001 From: dhb52 <dhb52@126.com> Date: 星期五, 24 五月 2024 13:30:51 +0800 Subject: [PATCH] !542 更新SnailJob版本到1.0.0-beta2 * feat: 配置项变更,避免误解snail-job.group-name => snail-job.group * chore: 更新snail-job版本到1.0.0-beta2 --- ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysDeptController.java | 6 +++++- 1 files changed, 5 insertions(+), 1 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 70463bd..98b76e4 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 @@ -75,6 +75,8 @@ public R<Void> add(@Validated @RequestBody SysDeptBo dept) { if (!deptService.checkDeptNameUnique(dept)) { return R.fail("鏂板閮ㄩ棬'" + dept.getDeptName() + "'澶辫触锛岄儴闂ㄥ悕绉板凡瀛樺湪"); + } else if (StringUtils.isNotBlank(dept.getDeptCategory()) && !deptService.checkDeptCategoryUnique(dept)) { + return R.fail("鏂板閮ㄩ棬'" + dept.getDeptName() + "'澶辫触锛岄儴闂ㄧ被鍒紪鐮佸凡瀛樺湪"); } return toAjax(deptService.insertDept(dept)); } @@ -90,6 +92,8 @@ deptService.checkDeptDataScope(deptId); if (!deptService.checkDeptNameUnique(dept)) { return R.fail("淇敼閮ㄩ棬'" + dept.getDeptName() + "'澶辫触锛岄儴闂ㄥ悕绉板凡瀛樺湪"); + } else if (StringUtils.isNotBlank(dept.getDeptCategory()) && !deptService.checkDeptCategoryUnique(dept)) { + 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())) { @@ -129,7 +133,7 @@ @SaCheckPermission("system:dept:query") @GetMapping("/optionselect") public R<List<SysDeptVo>> optionselect(@RequestParam(required = false) Long[] deptIds) { - return R.ok(deptService.selectDeptByIds(List.of(deptIds))); + return R.ok(deptService.selectDeptByIds(deptIds == null ? null : List.of(deptIds))); } } -- Gitblit v1.9.3