Skip to content

Commit 7fdbcd8

Browse files
authored
[service.go.tpl] Fix typo in time.Time FieldType.
There is a typo in service.go.tpl time.Time FieldType code.
1 parent 782fc0d commit 7fdbcd8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/resource/template/server/service.go.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func ({{.Abbreviation}}Service *{{.StructName}}Service)Get{{.StructName}}InfoLis
7373
db = db.Where("`{{.ColumnName}}` {{.FieldSearchType}} ?",{{if eq .FieldSearchType "LIKE"}}"%"+{{ end }}info.{{.FieldName}}{{if eq .FieldSearchType "LIKE"}}+"%"{{ end }})
7474
}
7575
{{- else if eq .FieldType "time.Time" }}
76-
if !info.{{.FieldName}} != nil {
76+
if info.{{.FieldName}} != nil {
7777
db = db.Where("`{{.ColumnName}}` {{.FieldSearchType}} ?",{{if eq .FieldSearchType "LIKE"}}"%"+{{ end }}info.{{.FieldName}}{{if eq .FieldSearchType "LIKE"}}+"%"{{ end }})
7878
}
7979
{{- end }}

0 commit comments

Comments
 (0)