feat: file manage
This commit is contained in:
1 parent
b9d3483ba3
commit
128e34ab04
11 files changed
+544
-44
No files matched your search
+12
-2
@@ -64,12 +64,22 @@ func GetSysTables(c *gin.Context) {
|
||||
var res app.Response
|
||||
res.Data = result
|
||||
mp := make(map[string]interface{})
|
||||
mp["rows"] = result.Columns
|
||||
mp["list"] = result.Columns
|
||||
mp["info"] = result
|
||||
res.Data = mp
|
||||
c.JSON(http.StatusOK, res.ReturnOK())
|
||||
}
|
||||
|
||||
func GetSysTablesTree(c *gin.Context) {
|
||||
var data tools.SysTables
|
||||
result, err := data.GetTree()
|
||||
tools2.HasError(err, "抱歉未找到相关信息", -1)
|
||||
|
||||
var res app.Response
|
||||
res.Data = result
|
||||
c.JSON(http.StatusOK, res.ReturnOK())
|
||||
}
|
||||
|
||||
// @Summary 添加表结构
|
||||
// @Description 添加表结构
|
||||
// @Tags 工具 - 生成表
|
||||
@@ -200,7 +210,7 @@ func genTableInit(tablesList []string, i int, c *gin.Context) (tools.SysTables,
|
||||
func UpdateSysTable(c *gin.Context) {
|
||||
var data tools.SysTables
|
||||
err := c.Bind(&data)
|
||||
tools2.HasError(err, "数据解析失败", -1)
|
||||
tools2.HasError(err, "数据解析失败", 500)
|
||||
data.UpdateBy = tools2.GetUserIdStr(c)
|
||||
result, err := data.Update()
|
||||
tools2.HasError(err, "", -1)
|
||||
|
||||
Reference in new issue
Block a user