修改了 - server/api/v1/sys_initdb.go - server/api/v1/sys_system.go 迁移了模型 - server/model/sys_init.go -> sysver/model/request/sys_init.go
@@ -13,11 +13,10 @@ import (
// @Tags InitDB
// @Summary 初始化用户数据库
-// @Security ApiKeyAuth
// @Produce application/json
-// @Param data body request.Empty true "空"
-// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
-// @Router /init/db [post]
+// @Param data body request.InitDB true "初始化数据库参数"
+// @Success 200 {string} string "{"code":0,"data":{},"msg":"自动创建数据库成功"}"
+// @Router /initdb [post]
func InitDB(c *gin.Context) {
if global.GVA_DB != nil {
global.GVA_LOG.Error("非法访问")
@@ -51,9 +51,8 @@ func SetSystemConfig(c *gin.Context) {
// @Summary 重启系统
// @Security ApiKeyAuth
-// @Param data body model.System true "重启系统"
-// @Success 200 {string} string "{"success":true,"data":{},"msg":"重启系统成功"}"
-// @Router /system/ReloadSystem [post]
+// @Success 200 {string} string "{"code":0,"data":{},"msg":"重启系统成功"}"
+// @Router /system/reloadSystem [post]
func ReloadSystem(c *gin.Context) {
if runtime.GOOS == "windows" {
response.FailWithMessage("系统不支持", c)
@@ -1,4 +1,4 @@
-package model
+package request
type InitDB struct {
Host string `json:"host"`