Feat(PersonalTool): Add pagination

Add pagination to personal tool management
This commit is contained in:
2024-04-27 16:32:13 +08:00
parent 5c3484a22d
commit f5b6687d97
11 changed files with 117 additions and 22 deletions

View File

@@ -8,8 +8,10 @@ import top.fatweb.oxygen.api.annotation.Trim
import top.fatweb.oxygen.api.entity.common.ResponseCode
import top.fatweb.oxygen.api.entity.common.ResponseResult
import top.fatweb.oxygen.api.entity.tool.ToolBase
import top.fatweb.oxygen.api.param.PageSortParam
import top.fatweb.oxygen.api.param.tool.*
import top.fatweb.oxygen.api.service.tool.IEditService
import top.fatweb.oxygen.api.vo.PageVo
import top.fatweb.oxygen.api.vo.tool.ToolCategoryVo
import top.fatweb.oxygen.api.vo.tool.ToolTemplateVo
import top.fatweb.oxygen.api.vo.tool.ToolVo
@@ -111,13 +113,16 @@ class EditController(
* @return Response object includes tool list
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
* @see PageSortParam
* @see ResponseResult
* @see PageVo
* @see ToolVo
*/
@Trim
@Operation(summary = "获取个人工具")
@GetMapping
fun get(): ResponseResult<List<ToolVo>> =
ResponseResult.databaseSuccess(ResponseCode.DATABASE_SELECT_SUCCESS, data = editService.get())
fun get(@Valid pageSortParam: PageSortParam): ResponseResult<PageVo<ToolVo>> =
ResponseResult.databaseSuccess(ResponseCode.DATABASE_SELECT_SUCCESS, data = editService.getPage(pageSortParam))
/**
* Get tool detail