@RestController @RequestMapping(value="/role") public class RoleController extends BaseController
构造器和说明 |
---|
RoleController() |
限定符和类型 | 方法和说明 |
---|---|
RespResult<Void> |
createRole(@Valid RoleParam roleParam)
创建角色
|
RespResult<Void> |
deleteRole(Long id)
删除角色
|
RespResult<List<RoleVO>> |
list()
获取全部角色信息
|
RespResult<PageVO<RoleVO>> |
search(String keyword,
String operatorIds,
String startDate,
String endDate,
@Valid PageParam pageParam)
查询符合条件的角色信息
|
RespResult<Void> |
updateRole(Long id,
@Valid RoleParam roleParam)
更新角色信息
|
RespResult<RoleVO> |
viewRole(Long id)
浏览角色信息
|
loadLoginUserId, loadLoginUserRole, loadTokenId, logout
@GetMapping(value="/{id}") @PreAuthorize(value="!@jwtSecurityUtils.isEnableJwtSecurity() or hasRole(\'ROLE_SUPER\') or (hasRole(\'ROLE_ADMIN\') and hasPermission(\'/role/{id}\',\'admin:config:role\'))") public RespResult<RoleVO> viewRole(@PathVariable(value="id") Long id)
id
- 应用ID@GetMapping(value="/list") @PreAuthorize(value="!@jwtSecurityUtils.isEnableJwtSecurity() or hasRole(\'ROLE_SUPER\') or (hasRole(\'ROLE_ADMIN\') and hasPermission(\'/role/list\',\'admin:config:role\'))") public RespResult<List<RoleVO>> list()
@PostMapping(value="/search") @PreAuthorize(value="!@jwtSecurityUtils.isEnableJwtSecurity() or hasRole(\'ROLE_SUPER\') or (hasRole(\'ROLE_ADMIN\') and hasPermission(\'/role/search\',\'admin:config:role\'))") public RespResult<PageVO<RoleVO>> search(@RequestParam(value="keyword",required=false) String keyword, @RequestParam(value="operatorIds",required=false) String operatorIds, @RequestParam(value="startDate") String startDate, @RequestParam(value="endDate") String endDate, @Valid @RequestBody @Valid PageParam pageParam)
@PutMapping(value="/create") @PreAuthorize(value="!@jwtSecurityUtils.isEnableJwtSecurity() or hasRole(\'ROLE_SUPER\') or (hasRole(\'ROLE_ADMIN\') and hasPermission(\'/role/create\',\'admin:config:role\'))") public RespResult<Void> createRole(@Valid @RequestBody @Valid RoleParam roleParam)
roleParam
- 角色信息@PutMapping(value="/update/{id}") @PreAuthorize(value="!@jwtSecurityUtils.isEnableJwtSecurity() or hasRole(\'ROLE_SUPER\') or (hasRole(\'ROLE_ADMIN\') and hasPermission(\'/role/update/{id}\',\'admin:config:role\'))") public RespResult<Void> updateRole(@PathVariable(value="id") Long id, @Valid @RequestBody @Valid RoleParam roleParam)
id
- 角色IDroleParam
- 角色信息@DeleteMapping(value="/{id}") @PreAuthorize(value="!@jwtSecurityUtils.isEnableJwtSecurity() or hasRole(\'ROLE_SUPER\') or (hasRole(\'ROLE_ADMIN\') and hasPermission(\'/role/{id}\',\'admin:config:role\'))") public RespResult<Void> deleteRole(@PathVariable(value="id") Long id)
id
- 角色ID