Optimize RoleController
This commit is contained in:
@@ -24,7 +24,7 @@ import top.fatweb.api.vo.permission.RoleWithPowerVo
|
||||
class RoleController(
|
||||
private val roleService: IRoleService
|
||||
) {
|
||||
@Operation(summary = "获取角色列表")
|
||||
@Operation(summary = "获取角色")
|
||||
@GetMapping
|
||||
fun get(roleGetParam: RoleGetParam?): ResponseResult<PageVo<RoleWithPowerVo>> {
|
||||
return ResponseResult.databaseSuccess(
|
||||
@@ -40,6 +40,14 @@ class RoleController(
|
||||
)
|
||||
}
|
||||
|
||||
@Operation(summary = "获取角色列表")
|
||||
@GetMapping("/list")
|
||||
fun list(): ResponseResult<List<RoleVo>> {
|
||||
return ResponseResult.databaseSuccess(
|
||||
data = roleService.listAll()
|
||||
)
|
||||
}
|
||||
|
||||
@Operation(summary = "添加角色")
|
||||
@PostMapping
|
||||
fun add(@Valid @RequestBody roleAddParam: RoleAddParam): ResponseResult<RoleVo> {
|
||||
|
||||
Reference in New Issue
Block a user