From 8497c7bcf6a822270820f6ebbabd9e2923f96d18 Mon Sep 17 00:00:00 2001 From: yxh Date: Wed, 8 Sep 2021 17:43:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90res=20v?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=E5=89=94=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/vm/go/dao.template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/template/vm/go/dao.template b/template/vm/go/dao.template index 6bf71fe..581946e 100644 --- a/template/vm/go/dao.template +++ b/template/vm/go/dao.template @@ -89,7 +89,7 @@ type {{$.table.ClassName}}{{$column.GoField}}Req struct { type {{.table.ClassName}}ListRes struct { {{range $index, $column := .table.Columns}} {{if eq $column.IsList "1" }} - {{$column.GoField}} {{if eq $column.GoType "Time"}}*gtime.Time{{else if eq $column.HtmlType "images" "file" "files"}}[]*comModel.UpFile{{else}}{{$column.GoType}}{{end}} `json:"{{$column.HtmlField}}" {{if eq $column.IsRequired "1"}}v:"required#{{$column.ColumnComment}}不能为空"{{end}}` + {{$column.GoField}} {{if eq $column.GoType "Time"}}*gtime.Time{{else if eq $column.HtmlType "images" "file" "files"}}[]*comModel.UpFile{{else}}{{$column.GoType}}{{end}} `json:"{{$column.HtmlField}}"` {{end}} {{end}} } @@ -97,7 +97,7 @@ type {{.table.ClassName}}ListRes struct { // {{.table.ClassName}}InfoRes 数据返回结果 type {{.table.ClassName}}InfoRes struct { {{range $index, $column := .table.Columns}} - {{$column.GoField}} {{if eq $column.GoType "Time"}}*gtime.Time{{else if eq $column.HtmlType "images" "file" "files"}}[]*comModel.UpFile{{else}}{{$column.GoType}}{{end}} `json:"{{$column.HtmlField}}" {{if eq $column.IsRequired "1"}}v:"required#{{$column.ColumnComment}}不能为空"{{end}}` + {{$column.GoField}} {{if eq $column.GoType "Time"}}*gtime.Time{{else if eq $column.HtmlType "images" "file" "files"}}[]*comModel.UpFile{{else}}{{$column.GoType}}{{end}} `json:"{{$column.HtmlField}}"` {{end}} }