Selaa lähdekoodia

[service.go.tpl] Fix typo in time.Time FieldType.

There is a typo in service.go.tpl time.Time FieldType code.
fengchao 3 vuotta sitten
vanhempi
commit
7fdbcd8935
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      server/resource/template/server/service.go.tpl

+ 1 - 1
server/resource/template/server/service.go.tpl

@@ -73,7 +73,7 @@ func ({{.Abbreviation}}Service *{{.StructName}}Service)Get{{.StructName}}InfoLis
         db = db.Where("`{{.ColumnName}}` {{.FieldSearchType}} ?",{{if eq .FieldSearchType "LIKE"}}"%"+{{ end }}info.{{.FieldName}}{{if eq .FieldSearchType "LIKE"}}+"%"{{ end }})
     }
                 {{- else if eq .FieldType "time.Time" }}
-    if !info.{{.FieldName}} != nil {
+    if info.{{.FieldName}} != nil {
          db = db.Where("`{{.ColumnName}}` {{.FieldSearchType}} ?",{{if eq .FieldSearchType "LIKE"}}"%"+{{ end }}info.{{.FieldName}}{{if eq .FieldSearchType "LIKE"}}+"%"{{ end }})
     }
                 {{- end }}