Update service.go.tpl (#2053)

fix 排序时错误获取失败:错误: 字段 "createdat" 不存在 (SQLSTATE 42703)

---------

Co-authored-by: PiexlMax(奇淼 <165128580+pixelmaxQm@users.noreply.github.com>
This commit is contained in:
gors
2025-07-03 13:19:44 +08:00
committed by GitHub
parent bf095c38e9
commit 2ec2e9a66e
2 changed files with 2 additions and 2 deletions

View File

@@ -162,7 +162,7 @@ func ({{.Abbreviation}}Service *{{.StructName}}Service)Get{{.StructName}}InfoLis
orderMap := make(map[string]bool)
{{- if .GvaModel }}
orderMap["id"] = true
orderMap["CreatedAt"] = true
orderMap["created_at"] = true
{{- end }}
{{- range .Fields}}
{{- if .Sort}}

View File

@@ -169,7 +169,7 @@ func (s *{{.Abbreviation}}) Get{{.StructName}}InfoList(ctx context.Context, info
orderMap := make(map[string]bool)
{{- if .GvaModel }}
orderMap["id"] = true
orderMap["CreatedAt"] = true
orderMap["created_at"] = true
{{- end }}
{{- range .Fields}}
{{- if .Sort}}