feat:cms + gen code
This commit is contained in:
1 parent
7215f7c236
commit
d27583421b
14 files changed
+644
-60
No files matched your search
+2
-2
@@ -139,7 +139,7 @@ func GenMenuAndApi(c *gin.Context) {
|
||||
table.TableId = id
|
||||
tab, _ := table.Get()
|
||||
Mmenu := models.Menu{}
|
||||
Mmenu.MenuName = tab.TBName + "管理"
|
||||
Mmenu.MenuName = tab.TBName + "Manage"
|
||||
Mmenu.Title = tab.TableComment
|
||||
Mmenu.Icon = "pass"
|
||||
Mmenu.Path = "/" + tab.TBName
|
||||
@@ -158,7 +158,7 @@ func GenMenuAndApi(c *gin.Context) {
|
||||
Mmenu.MenuId, err = Mmenu.Create()
|
||||
|
||||
Cmenu := models.Menu{}
|
||||
Cmenu.MenuName = tab.TBName + "管理"
|
||||
Cmenu.MenuName = tab.TBName
|
||||
Cmenu.Title = tab.TableComment
|
||||
Cmenu.Icon = "pass"
|
||||
Cmenu.Path = tab.TBName
|
||||
|
||||
@@ -70,6 +70,23 @@ func GetSysTables(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, res.ReturnOK())
|
||||
}
|
||||
|
||||
func GetSysTablesInfo(c *gin.Context) {
|
||||
var data tools.SysTables
|
||||
if c.Request.FormValue("tableName")!="" {
|
||||
data.TBName = c.Request.FormValue("tableName")
|
||||
}
|
||||
result, err := data.Get()
|
||||
tools2.HasError(err, "抱歉未找到相关信息", -1)
|
||||
|
||||
var res app.Response
|
||||
res.Data = result
|
||||
mp := make(map[string]interface{})
|
||||
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()
|
||||
|
||||
Reference in new issue
Block a user