From 89cb601d6f743e4e1dfa63503aadfa91bfda7d1b Mon Sep 17 00:00:00 2001 From: jay <75509151@qq.com> Date: Mon, 12 Jun 2023 17:16:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=92=E8=89=B2id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/controller/SysRoleController.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/iot-module/iot-system/src/main/java/cc/iotkit/system/controller/SysRoleController.java b/iot-module/iot-system/src/main/java/cc/iotkit/system/controller/SysRoleController.java index cf5e3242..40e71d1f 100644 --- a/iot-module/iot-system/src/main/java/cc/iotkit/system/controller/SysRoleController.java +++ b/iot-module/iot-system/src/main/java/cc/iotkit/system/controller/SysRoleController.java @@ -104,8 +104,8 @@ public class SysRoleController extends BaseController { public void edit(@Validated @RequestBody Request bo) { SysRoleBo role = bo.getData(); - roleService.checkRoleAllowed(role.getRoleId()); - roleService.checkRoleDataScope(role.getRoleId()); + roleService.checkRoleAllowed(role.getId()); + roleService.checkRoleDataScope(role.getId()); if (!roleService.checkRoleNameUnique(role)) { fail("修改角色'" + role.getRoleName() + "'失败,角色名称已存在"); } else if (!roleService.checkRoleKeyUnique(role)) { @@ -113,7 +113,7 @@ public class SysRoleController extends BaseController { } if (roleService.updateRole(role) > 0) { - roleService.cleanOnlineUserByRole(role.getRoleId()); + roleService.cleanOnlineUserByRole(role.getId()); } fail("修改角色'" + role.getRoleName() + "'失败,请联系管理员"); } @@ -127,8 +127,8 @@ public class SysRoleController extends BaseController { @PostMapping("/dataScope") public void dataScope(@RequestBody Request bo) { SysRoleBo role = bo.getData(); - roleService.checkRoleAllowed(role.getRoleId()); - roleService.checkRoleDataScope(role.getRoleId()); + roleService.checkRoleAllowed(role.getId()); + roleService.checkRoleDataScope(role.getId()); roleService.authDataScope(role); } @@ -141,9 +141,9 @@ public class SysRoleController extends BaseController { @PostMapping("/changeStatus") public void changeStatus(@RequestBody Request bo) { SysRoleBo role = bo.getData(); - roleService.checkRoleAllowed(role.getRoleId()); - roleService.checkRoleDataScope(role.getRoleId()); - roleService.updateRoleStatus(role.getRoleId(), role.getStatus()); + roleService.checkRoleAllowed(role.getId()); + roleService.checkRoleDataScope(role.getId()); + roleService.updateRoleStatus(role.getId(), role.getStatus()); } /**