refactor🎨 修改工具写法
This commit is contained in:
1 parent
1c046d9ddd
commit
a8c5f19075
4 files changed
+5
-2
No files matched your search
@@ -10,6 +10,7 @@ import (
|
|||||||
"go-admin/app/admin/models/tools"
|
"go-admin/app/admin/models/tools"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// GetDBColumnList 分页列表数据
|
||||||
// @Summary 分页列表数据 / page list data
|
// @Summary 分页列表数据 / page list data
|
||||||
// @Description 数据库表列分页列表 / database table column page list
|
// @Description 数据库表列分页列表 / database table column page list
|
||||||
// @Tags 工具 / Tools
|
// @Tags 工具 / Tools
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import (
|
|||||||
"go-admin/app/admin/models/tools"
|
"go-admin/app/admin/models/tools"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// GetDBTableList 分页列表数据
|
||||||
// @Summary 分页列表数据 / page list data
|
// @Summary 分页列表数据 / page list data
|
||||||
// @Description 数据库表分页列表 / database table page list
|
// @Description 数据库表分页列表 / database table page list
|
||||||
// @Tags 工具 / Tools
|
// @Tags 工具 / Tools
|
||||||
@@ -32,7 +33,6 @@ func (e *Gen) GetDBTableList(c *gin.Context) {
|
|||||||
err = errors.New("对不起,sqlite3 或 postgres 不支持代码生成!")
|
err = errors.New("对不起,sqlite3 或 postgres 不支持代码生成!")
|
||||||
log.Warn(err)
|
log.Warn(err)
|
||||||
e.Error(403, err, "")
|
e.Error(403, err, "")
|
||||||
//c.JSON(http.StatusOK, res.ReturnError(500))
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -338,8 +338,9 @@ func (e Gen) ActionsGen(c *gin.Context, tab tools.SysTables) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (e Gen) GenMenuAndApi(c *gin.Context) {
|
func (e Gen) GenMenuAndApi(c *gin.Context) {
|
||||||
log := api.GetRequestLogger(c)
|
|
||||||
e.Context = c
|
e.Context = c
|
||||||
|
log := e.GetLogger()
|
||||||
|
|
||||||
table := tools.SysTables{}
|
table := tools.SysTables{}
|
||||||
timeNow := pkg.GetCurrentTime()
|
timeNow := pkg.GetCurrentTime()
|
||||||
id, err := pkg.StringToInt(c.Param("tableId"))
|
id, err := pkg.StringToInt(c.Param("tableId"))
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ type SysTable struct {
|
|||||||
apis.Api
|
apis.Api
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetSysTableList 分页列表数据
|
||||||
// @Summary 分页列表数据
|
// @Summary 分页列表数据
|
||||||
// @Description 生成表分页列表
|
// @Description 生成表分页列表
|
||||||
// @Tags 工具 - 生成表
|
// @Tags 工具 - 生成表
|
||||||
|
|||||||
Reference in new issue
Block a user