Optimize code

This commit is contained in:
2023-11-15 16:23:42 +08:00
parent b4f60eba94
commit 3735ded9f2
3 changed files with 4 additions and 4 deletions

View File

@@ -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())
} }

View File

@@ -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
} }

View File

@@ -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()