Optimize kdoc

This commit is contained in:
2024-02-23 09:51:03 +08:00
parent 5ea9203a08
commit d38f9f4a58
7 changed files with 107 additions and 4 deletions

View File

@@ -22,6 +22,7 @@ class PowerController(
/** /**
* Get power list * Get power list
* *
* @return Response object includes power list
* @author FatttSnake, fatttsnake@gmail.com * @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0 * @since 1.0.0
* @see ResponseResult * @see ResponseResult

View File

@@ -35,8 +35,11 @@ class SettingsController(
/** /**
* Get base settings * Get base settings
* *
* @return Response object includes base settings information
* @author FatttSnake, fatttsnake@gmail.com * @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0 * @since 1.0.0
* @see ResponseResult
* @see BaseSettingsVo
*/ */
@Operation(summary = "获取基础设置") @Operation(summary = "获取基础设置")
@GetMapping("/base") @GetMapping("/base")
@@ -46,8 +49,12 @@ class SettingsController(
/** /**
* Update base settings * Update base settings
* *
* @param baseSettingsParam Base settings parameters
* @return Response object
* @author FatttSnake, fatttsnake@gmail.com * @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0 * @since 1.0.0
* @see BaseSettingsParam
* @see ResponseResult
*/ */
@Operation(summary = "更新基础设置") @Operation(summary = "更新基础设置")
@PutMapping("/base") @PutMapping("/base")
@@ -92,8 +99,12 @@ class SettingsController(
/** /**
* Send mail test * Send mail test
* *
* @param mailSendParam Mail send parameters
* @return Response object
* @author FatttSnake, fatttsnake@gmail.com * @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0 * @since 1.0.0
* @see MailSendParam
* @see ResponseResult
*/ */
@Operation(summary = "邮件发送测试") @Operation(summary = "邮件发送测试")
@PostMapping("/mail") @PostMapping("/mail")
@@ -106,8 +117,11 @@ class SettingsController(
/** /**
* Get sensitive word settings * Get sensitive word settings
* *
* @return Response object includes sensitive word settings information
* @author FatttSnake, fatttsnake@gmail.com * @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0 * @since 1.0.0
* @see ResponseResult
* @see SensitiveWordVo
*/ */
@Operation(summary = "获取敏感词配置") @Operation(summary = "获取敏感词配置")
@GetMapping("/sensitive") @GetMapping("/sensitive")
@@ -118,8 +132,12 @@ class SettingsController(
/** /**
* Add sensitive word * Add sensitive word
* *
* @param sensitiveWordAddParam Add sensitive word settings parameters
* @return Response object
* @author FatttSnake, fatttsnake@gmail.com * @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0 * @since 1.0.0
* @see SensitiveWordAddParam
* @see ResponseResult
*/ */
@Operation(summary = "添加敏感词") @Operation(summary = "添加敏感词")
@PostMapping("/sensitive") @PostMapping("/sensitive")
@@ -132,8 +150,12 @@ class SettingsController(
/** /**
* Update sensitive word * Update sensitive word
* *
* @param sensitiveWordUpdateParam Update sensitive word settings parameters
* @return Response object
* @author FatttSnake, fatttsnake@gmail.com * @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0 * @since 1.0.0
* @see SensitiveWordUpdateParam
* @see ResponseResult
*/ */
@Operation(summary = "修改敏感词") @Operation(summary = "修改敏感词")
@PutMapping("/sensitive") @PutMapping("/sensitive")
@@ -146,8 +168,11 @@ class SettingsController(
/** /**
* Delete sensitive word * Delete sensitive word
* *
* @see id Sensitive word ID
* @return Response object
* @author FatttSnake, fatttsnake@gmail.com * @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0 * @since 1.0.0
* @see ResponseResult
*/ */
@Operation(summary = "删除敏感词") @Operation(summary = "删除敏感词")
@DeleteMapping("/sensitive/{id}") @DeleteMapping("/sensitive/{id}")

View File

@@ -80,8 +80,13 @@ class StatisticsController(
/** /**
* Get the history of online users information * Get the history of online users information
* *
* @param onlineInfoGetParam Get online information parameters
* @return Response object includes online user information
* @author FatttSnake, fatttsnake@gmail.com * @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0 * @since 1.0.0
* @see OnlineInfoGetParam
* @see ResponseResult
* @see OnlineInfoVo
*/ */
@Operation(summary = "获取在线用户数量信息") @Operation(summary = "获取在线用户数量信息")
@GetMapping("/online") @GetMapping("/online")
@@ -92,8 +97,13 @@ class StatisticsController(
/** /**
* Get the history of active information * Get the history of active information
* *
* @param activeInfoGetParam Get active information parameters
* @return Response object includes history of active information
* @author FatttSnake, fatttsnake@gmail.com * @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0 * @since 1.0.0
* @see ActiveInfoGetParam
* @see ResponseResult
* @see ActiveInfoVo
*/ */
@Operation(summary = "获取用户活跃信息") @Operation(summary = "获取用户活跃信息")
@GetMapping("/active") @GetMapping("/active")

View File

@@ -24,10 +24,10 @@ class SysLogController(
private val sysLogService: ISysLogService private val sysLogService: ISysLogService
) { ) {
/** /**
* Get system log * Get system log in page
* *
* @param sysLogGetParam Get system log parameters * @param sysLogGetParam Get system log parameters
* @return Response object includes system log * @return Response object includes system log in page
* @author FatttSnake, fatttsnake@gmail.com * @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0 * @since 1.0.0
* @see SysLogGetParam * @see SysLogGetParam

View File

@@ -17,6 +17,7 @@ import top.fatweb.oxygen.api.vo.tool.ToolCategoryVo
* *
* @author FatttSnake, fatttsnake@gmail.com * @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0 * @since 1.0.0
* @see IToolCategoryService
*/ */
@BaseController(path = ["/system/tool/category"], name = "工具类别管理", description = "工具列别管理相关接口") @BaseController(path = ["/system/tool/category"], name = "工具类别管理", description = "工具列别管理相关接口")
class CategoryController( class CategoryController(

View File

@@ -19,6 +19,7 @@ import top.fatweb.oxygen.api.vo.tool.ToolVo
* *
* @author FatttSnake, fatttsnake@gmail.com * @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0 * @since 1.0.0
* @see IEditService
*/ */
@BaseController(path = ["/tool"], name = "工具编辑", description = "工具编辑相关接口") @BaseController(path = ["/tool"], name = "工具编辑", description = "工具编辑相关接口")
class EditController( class EditController(
@@ -70,8 +71,13 @@ class EditController(
/** /**
* Create tool * Create tool
* *
* @param toolCreateParam Create tool parameters
* @return Response object includes tool information
* @author FatttSnake, fatttsnake@gmail.com * @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0 * @since 1.0.0
* @see ToolCreateParam
* @see ResponseResult
* @see ToolVo
*/ */
@Operation(summary = "创建工具") @Operation(summary = "创建工具")
@PostMapping @PostMapping
@@ -81,8 +87,13 @@ class EditController(
/** /**
* Upgrade tool * Upgrade tool
* *
* @param toolUpgradeParam Upgrade tool parameters
* @return Response object includes tool information
* @author FatttSnake, fatttsnake@gmail.com * @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0 * @since 1.0.0
* @see ToolUpgradeParam
* @see ResponseResult
* @see ToolVo
*/ */
@Operation(summary = "升级工具") @Operation(summary = "升级工具")
@PatchMapping @PatchMapping
@@ -95,8 +106,11 @@ class EditController(
/** /**
* Get personal tool * Get personal tool
* *
* @return Response object includes tool list
* @author FatttSnake, fatttsnake@gmail.com * @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0 * @since 1.0.0
* @see ResponseResult
* @see ToolVo
*/ */
@Operation(summary = "获取个人工具") @Operation(summary = "获取个人工具")
@GetMapping @GetMapping
@@ -106,12 +120,22 @@ class EditController(
/** /**
* Get tool detail * Get tool detail
* *
* @param username Username
* @param toolId Tool ID
* @param ver Version
* @return Response object includes tool information
* @author FatttSnake, fatttsnake@gmail.com * @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0 * @since 1.0.0
* @see ResponseResult
* @see ToolVo
*/ */
@Operation(summary = "获取工具内容") @Operation(summary = "获取工具内容")
@GetMapping("/detail/{username}/{toolId}/{ver}") @GetMapping("/detail/{username}/{toolId}/{ver}")
fun detail(@PathVariable username: String, @PathVariable toolId: String, @PathVariable ver: String) = fun detail(
@PathVariable username: String,
@PathVariable toolId: String,
@PathVariable ver: String
): ResponseResult<ToolVo> =
ResponseResult.databaseSuccess( ResponseResult.databaseSuccess(
ResponseCode.DATABASE_SELECT_SUCCESS, ResponseCode.DATABASE_SELECT_SUCCESS,
data = editService.detail(username, toolId, ver) data = editService.detail(username, toolId, ver)
@@ -120,19 +144,27 @@ class EditController(
/** /**
* Update tool * Update tool
* *
* @param toolUpdateParam Update tool parameters
* @return Response object includes tool information
* @author FatttSnake, fatttsnake@gmail.com * @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0 * @since 1.0.0
* @see ToolUpdateParam
* @see ResponseResult
* @see ToolVo
*/ */
@Operation(summary = "更新工具") @Operation(summary = "更新工具")
@PutMapping @PutMapping
fun update(@RequestBody @Valid toolUpdateParam: ToolUpdateParam) = fun update(@RequestBody @Valid toolUpdateParam: ToolUpdateParam): ResponseResult<ToolVo> =
ResponseResult.databaseSuccess(ResponseCode.DATABASE_UPDATE_SUCCESS, data = editService.update(toolUpdateParam)) ResponseResult.databaseSuccess(ResponseCode.DATABASE_UPDATE_SUCCESS, data = editService.update(toolUpdateParam))
/** /**
* Submit tool review * Submit tool review
* *
* @param id Tool ID
* @return Response object
* @author FatttSnake, fatttsnake@gmail.com * @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0 * @since 1.0.0
* @see ResponseResult
*/ */
@Operation(summary = "提交工具审核") @Operation(summary = "提交工具审核")
@PostMapping("/{id}") @PostMapping("/{id}")
@@ -143,8 +175,11 @@ class EditController(
/** /**
* Cancel tool review * Cancel tool review
* *
* @param id Tool ID
* @return Response object
* @author FatttSnake, fatttsnake@gmail.com * @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0 * @since 1.0.0
* @see ResponseResult
*/ */
@Operation(summary = "取消工具审核") @Operation(summary = "取消工具审核")
@PutMapping("/{id}") @PutMapping("/{id}")
@@ -155,8 +190,11 @@ class EditController(
/** /**
* Delete tool * Delete tool
* *
* @param id Tool ID
* @return Response object
* @author FatttSnake, fatttsnake@gmail.com * @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0 * @since 1.0.0
* @see ResponseResult
*/ */
@Operation(summary = "删除工具") @Operation(summary = "删除工具")
@DeleteMapping("/{id}") @DeleteMapping("/{id}")

View File

@@ -18,6 +18,7 @@ import top.fatweb.oxygen.api.vo.tool.ToolVo
* *
* @author FatttSnake, fatttsnake@gmail.com * @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0 * @since 1.0.0
* @see IManagementService
*/ */
@BaseController(path = ["/system/tool"], name = "工具管理", description = "工具管理相关接口") @BaseController(path = ["/system/tool"], name = "工具管理", description = "工具管理相关接口")
class ManagementController( class ManagementController(
@@ -26,8 +27,12 @@ class ManagementController(
/** /**
* Get tool by ID * Get tool by ID
* *
* @param id Tool ID
* @return Response object includes tool information
* @author FatttSnake, fatttsnake@gmail.com * @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0 * @since 1.0.0
* @see ResponseResult
* @see ToolVo
*/ */
@Operation(summary = "获取单个工具") @Operation(summary = "获取单个工具")
@GetMapping("/{id}") @GetMapping("/{id}")
@@ -38,8 +43,14 @@ class ManagementController(
/** /**
* Get tool paging information * Get tool paging information
* *
* @param toolManagementGetParam Get tool parameters in tool management
* @return Response object includes tool paging information
* @author FatttSnake, fatttsnake@gmail.com * @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0 * @since 1.0.0
* @see ToolManagementGetParam
* @see ResponseResult
* @see PageVo
* @see ToolVo
*/ */
@Operation(summary = "获取工具") @Operation(summary = "获取工具")
@GetMapping @GetMapping
@@ -50,8 +61,14 @@ class ManagementController(
/** /**
* Pass tool review * Pass tool review
* *
* @param id Tool ID
* @param toolManagementPassParam Pass tool parameters in tool management
* @return Response object includes tool information
* @author FatttSnake, fatttsnake@gmail.com * @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0 * @since 1.0.0
* @see ToolManagementPassParam
* @see ResponseResult
* @see ToolVo
*/ */
@Operation(summary = "通过审核") @Operation(summary = "通过审核")
@PostMapping("/{id}") @PostMapping("/{id}")
@@ -68,8 +85,12 @@ class ManagementController(
/** /**
* Reject tool review * Reject tool review
* *
* @param id Tool ID
* @return Response object includes tool information
* @author FatttSnake, fatttsnake@gmail.com * @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0 * @since 1.0.0
* @see ResponseResult
* @see ToolVo
*/ */
@Operation(summary = "驳回审核") @Operation(summary = "驳回审核")
@PutMapping("/{id}") @PutMapping("/{id}")
@@ -80,8 +101,12 @@ class ManagementController(
/** /**
* Put off shelve * Put off shelve
* *
* @param id Tool ID
* @return Response object includes tool information
* @author FatttSnake, fatttsnake@gmail.com * @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0 * @since 1.0.0
* @see ResponseResult
* @see ToolVo
*/ */
@Operation(summary = "下架") @Operation(summary = "下架")
@PatchMapping("/{id}") @PatchMapping("/{id}")
@@ -92,8 +117,11 @@ class ManagementController(
/** /**
* Delete tool * Delete tool
* *
* @param id Tool ID
* @return Response object
* @author FatttSnake, fatttsnake@gmail.com * @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0 * @since 1.0.0
* @see ResponseResult
*/ */
@Operation(summary = "删除工具") @Operation(summary = "删除工具")
@DeleteMapping("/{id}") @DeleteMapping("/{id}")