Optimize code
This commit is contained in:
@@ -18,6 +18,6 @@ class PowerController(
|
|||||||
private val powerService: IPowerService
|
private val powerService: IPowerService
|
||||||
) {
|
) {
|
||||||
@Operation(summary = "获取权限列表")
|
@Operation(summary = "获取权限列表")
|
||||||
@GetMapping
|
@GetMapping("/list")
|
||||||
fun get() = ResponseResult.databaseSuccess(data = powerService.getAll())
|
fun getList() = ResponseResult.databaseSuccess(data = powerService.getList())
|
||||||
}
|
}
|
||||||
@@ -13,5 +13,5 @@ import top.fatweb.api.vo.permission.PowerSetVo
|
|||||||
* @since 2023-10-25
|
* @since 2023-10-25
|
||||||
*/
|
*/
|
||||||
interface IPowerService : IService<Power> {
|
interface IPowerService : IService<Power> {
|
||||||
fun getAll(): PowerSetVo
|
fun getList(): PowerSetVo
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class PowerServiceImpl(
|
|||||||
private val elementService: IElementService,
|
private val elementService: IElementService,
|
||||||
private val operationService: IOperationService
|
private val operationService: IOperationService
|
||||||
) : ServiceImpl<PowerMapper, Power>(), IPowerService {
|
) : ServiceImpl<PowerMapper, Power>(), IPowerService {
|
||||||
override fun getAll() = PowerConverter.powerSetToPowerSetVo(PowerSet().apply {
|
override fun getList() = PowerConverter.powerSetToPowerSetVo(PowerSet().apply {
|
||||||
moduleList = moduleService.list()
|
moduleList = moduleService.list()
|
||||||
menuList = menuService.list()
|
menuList = menuService.list()
|
||||||
elementList = elementService.list()
|
elementList = elementService.list()
|
||||||
|
|||||||
Reference in New Issue
Block a user