Update service.go.tpl (#2053)
fix 排序时错误获取失败:错误: 字段 "createdat" 不存在 (SQLSTATE 42703) --------- Co-authored-by: PiexlMax(奇淼 <165128580+pixelmaxQm@users.noreply.github.com>
This commit is contained in:
@@ -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}}
|
||||
|
@@ -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}}
|
||||
|
Reference in New Issue
Block a user