From 558ffc4bcaf7aa5c683e7c9ce01e971feb9e4d95 Mon Sep 17 00:00:00 2001 From: dengzedong <dengzedong@email> Date: 星期一, 14 十月 2024 14:11:48 +0800 Subject: [PATCH] 模型打包租户隔离 备份文件租户隔离 --- iailab-module-system/iailab-module-system-biz/src/main/java/com/iailab/module/system/controller/admin/permission/PermissionController.java | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/iailab-module-system/iailab-module-system-biz/src/main/java/com/iailab/module/system/controller/admin/permission/PermissionController.java b/iailab-module-system/iailab-module-system-biz/src/main/java/com/iailab/module/system/controller/admin/permission/PermissionController.java index 26ff774..0bf9e24 100644 --- a/iailab-module-system/iailab-module-system-biz/src/main/java/com/iailab/module/system/controller/admin/permission/PermissionController.java +++ b/iailab-module-system/iailab-module-system-biz/src/main/java/com/iailab/module/system/controller/admin/permission/PermissionController.java @@ -43,6 +43,14 @@ return success(permissionService.getRoleMenuListByRoleId(roleId)); } + @Operation(summary = "获得角色拥有的菜单编号") + @Parameter(name = "roleId", description = "角色编号", required = true) + @GetMapping("/list-role-app-menus") + @PreAuthorize("@ss.hasPermission('system:permission:assign-role-menu')") + public CommonResult<Set<Long>> getRoleAppMenuList(Long roleId) { + return success(permissionService.getRoleAppMenuListByRoleId(roleId)); + } + @PostMapping("/assign-role-menu") @Operation(summary = "赋予角色菜单") @PreAuthorize("@ss.hasPermission('system:permission:assign-role-menu')") @@ -55,6 +63,15 @@ return success(true); } + @PostMapping("/assign-role-app-menu") + @Operation(summary = "赋予角色菜单") + @PreAuthorize("@ss.hasPermission('system:permission:assign-role-menu')") + public CommonResult<Boolean> assignRoleAppMenu(@Validated @RequestBody PermissionAssignRoleMenuReqVO reqVO) { + // 执行菜单的分配 + permissionService.assignRoleAppMenu(reqVO.getRoleId(), reqVO.getMenuIds()); + return success(true); + } + @PostMapping("/assign-role-data-scope") @Operation(summary = "赋予角色数据权限") @PreAuthorize("@ss.hasPermission('system:permission:assign-role-data-scope')") -- Gitblit v1.9.3