Complete core functions #9

Merged
FatttSnake merged 171 commits from FatttSnake into dev 2024-02-23 11:56:35 +08:00
7 changed files with 107 additions and 4 deletions
Showing only changes of commit d38f9f4a58 - Show all commits

View File

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

View File

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

View File

@@ -80,8 +80,13 @@ class StatisticsController(
/**
* 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
* @since 1.0.0
* @see OnlineInfoGetParam
* @see ResponseResult
* @see OnlineInfoVo
*/
@Operation(summary = "获取在线用户数量信息")
@GetMapping("/online")
@@ -92,8 +97,13 @@ class StatisticsController(
/**
* 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
* @since 1.0.0
* @see ActiveInfoGetParam
* @see ResponseResult
* @see ActiveInfoVo
*/
@Operation(summary = "获取用户活跃信息")
@GetMapping("/active")

View File

@@ -24,10 +24,10 @@ class SysLogController(
private val sysLogService: ISysLogService
) {
/**
* Get system log
* Get system log in page
*
* @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
* @since 1.0.0
* @see SysLogGetParam

View File

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

View File

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

View File

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