mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-21 18:20:50 +00:00
fix:fix parameter setting
This commit is contained in:
+4
-2
@@ -55,6 +55,8 @@ func Preview(c *gin.Context) {
|
|||||||
func GenCode(c *gin.Context) {
|
func GenCode(c *gin.Context) {
|
||||||
table := tools.SysTables{}
|
table := tools.SysTables{}
|
||||||
id, err := tools2.StringToInt(c.Param("tableId"))
|
id, err := tools2.StringToInt(c.Param("tableId"))
|
||||||
|
tools2.HasError(err, "", -1)
|
||||||
|
table.TableId = id
|
||||||
ischeckrole := true
|
ischeckrole := true
|
||||||
|
|
||||||
rouyerfile := "template/routercheckrole.go.template"
|
rouyerfile := "template/routercheckrole.go.template"
|
||||||
@@ -77,8 +79,8 @@ func GenCode(c *gin.Context) {
|
|||||||
rouyerfile = "template/routernocheckrole.go.template"
|
rouyerfile = "template/routernocheckrole.go.template"
|
||||||
}
|
}
|
||||||
|
|
||||||
tools2.HasError(err, "", -1)
|
|
||||||
table.TableId = id
|
|
||||||
|
|
||||||
t1, err := template.ParseFiles("template/model.go.template")
|
t1, err := template.ParseFiles("template/model.go.template")
|
||||||
tools2.HasError(err, "", -1)
|
tools2.HasError(err, "", -1)
|
||||||
|
|||||||
Reference in New Issue
Block a user