| | |
| | | @Parameter(name = "roleId", description = "角色编号", required = true) |
| | | @GetMapping("/list-role-menus") |
| | | @PreAuthorize("@ss.hasPermission('system:permission:assign-role-menu')") |
| | | public CommonResult<Set<Long>> getRoleMenuList(Long roleId) { |
| | | public CommonResult<Set<Long>> getRoleMenuList(@RequestParam("roleId") Long roleId) { |
| | | // 显式声明必填:roleId 缺失时由 Spring 返回 400「请求参数不正确」, |
| | | // 而不是传到 RoleServiceImpl 用 null 作为缓存 key,抛 |
| | | // IllegalArgumentException: Null key returned for cache operation 变成 500 |
| | | return success(permissionService.getRoleMenuListByRoleId(roleId)); |
| | | } |
| | | |