| | |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/queryRoleByUserId/{userId}") |
| | | @PostMapping("/queryRoleByUserId/{userId}") |
| | | public R<SysRole> queryRoleByUserId(@PathVariable("userId") Long userId){ |
| | | SysUserRole one = sysUserRoleService.getOne(Wrappers.lambdaQuery(SysUserRole.class) |
| | | .eq(SysUserRole::getUserId, userId) |
| | |
| | | } |
| | | |
| | | |
| | | @GetMapping("/queryRoleByRoleId/{roleId}") |
| | | @PostMapping("/queryRoleByRoleId/{roleId}") |
| | | public R<SysRole> queryRoleByRoleId(@PathVariable("roleId") Long roleId){ |
| | | return R.ok( roleService.getOne(Wrappers.lambdaQuery(SysRole.class) |
| | | .eq(SysRole::getRoleId, roleId) |