Add setting controller

This commit is contained in:
2023-12-03 23:07:22 +08:00
parent d7c0b7376d
commit 5c8775bf12
10 changed files with 166 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
package top.fatweb.api.controller.system
import io.swagger.v3.oas.annotations.Operation
import io.swagger.v3.oas.annotations.tags.Tag
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
import top.fatweb.api.entity.common.ResponseResult
import top.fatweb.api.param.system.SettingParam
import top.fatweb.api.service.system.ISysSettingService
import top.fatweb.api.vo.system.SettingVo
/**
* System setting controller
*
* @author FatttSnake, fatttsnake@gmail.com
* @since 1.0.0
*/
@Tag(name = "系统设置", description = "系统设置相关接口")
@RequestMapping("/system/setting")
@RestController
class SettingController(
private val sysSettingService: ISysSettingService
) {
@Operation(summary = "获取")
fun get(): ResponseResult<SettingVo> = ResponseResult.success(data = sysSettingService.get())
@Operation(summary = "更新")
fun update(settingParam: SettingParam): ResponseResult<Nothing> {
sysSettingService.update(settingParam)
return ResponseResult.success()
}
}