From 791d07d09bdeaf68dec58b8cab73c7df050363d1 Mon Sep 17 00:00:00 2001 From: zhangwenjian Date: Thu, 23 Jul 2020 18:11:10 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9Afix=20parameter=20setting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/tools/gen.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apis/tools/gen.go b/apis/tools/gen.go index e5e9d052..4294ffe2 100644 --- a/apis/tools/gen.go +++ b/apis/tools/gen.go @@ -55,6 +55,8 @@ func Preview(c *gin.Context) { func GenCode(c *gin.Context) { table := tools.SysTables{} id, err := tools2.StringToInt(c.Param("tableId")) + tools2.HasError(err, "", -1) + table.TableId = id ischeckrole := true rouyerfile := "template/routercheckrole.go.template" @@ -77,8 +79,8 @@ func GenCode(c *gin.Context) { rouyerfile = "template/routernocheckrole.go.template" } - tools2.HasError(err, "", -1) - table.TableId = id + + t1, err := template.ParseFiles("template/model.go.template") tools2.HasError(err, "", -1)