소스 검색

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

There is a typo in service.go.tpl time.Time FieldType code.
fengchao 3 년 전
부모
커밋
7fdbcd8935
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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 }}