From 4df859a0ea3479e560707f5aa3875cb471ad900b Mon Sep 17 00:00:00 2001 From: zhaoyidong Date: Tue, 6 Sep 2022 14:10:27 +0800 Subject: [PATCH] =?UTF-8?q?fix=F0=9F=90=9B:=E6=8E=92=E5=BA=8F=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E5=BF=85=E9=A1=BB=E7=94=A8string=E6=8E=A5=E6=94=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 优化了代码生成的格式,最后的空行无法删除,删除之后}前面会增加空格 --- template/v4/dto.go.template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/template/v4/dto.go.template b/template/v4/dto.go.template index 4f84c9f3..507f0c15 100644 --- a/template/v4/dto.go.template +++ b/template/v4/dto.go.template @@ -34,9 +34,9 @@ type {{.ClassName}}GetPageReq struct { } type {{.ClassName}}Order struct { - {{- $tablename := .TBName -}} + {{ $tablename := .TBName }} {{- range .Columns -}} - {{.GoField}} {{.GoType}} `form:"{{.JsonField}}Order" search:"type:order;column:{{.ColumnName}};table:{{$tablename}}"` + {{.GoField}} string `form:"{{.JsonField}}Order" search:"type:order;column:{{.ColumnName}};table:{{$tablename}}"` {{ end }} } @@ -144,4 +144,4 @@ type {{.ClassName}}DeleteReq struct { func (s *{{.ClassName}}DeleteReq) GetId() interface{} { return s.Ids -} \ No newline at end of file +}