fix code gen problem.

This commit is contained in:
horizonzy committed 2022-01-31 12:00:26 +08:00
1 parent e2c5075319
commit 3cfa7a2767
2 files changed
+18 -5

No files matched your search

+4 -4
View File
@@ -1,10 +1,6 @@
package dto
import (
"go-admin/app/{{.PackageName}}/models"
"go-admin/common/dto"
common "go-admin/common/models"
{{- $bb := false -}}
{{- range .Columns -}}
{{$z := .IsQuery}}
@@ -18,6 +14,10 @@ import (
{{- if eq $bb true -}}
"time"
{{- end }}
"go-admin/app/{{.PackageName}}/models"
"go-admin/common/dto"
common "go-admin/common/models"
)
type {{.ClassName}}GetPageReq struct {
+14 -1
View File
@@ -1,9 +1,22 @@
package models
import (
// "gorm.io/gorm"
{{- $bb := false -}}
{{- range .Columns -}}
{{$z := .IsQuery}}
{{- if ($z) }}
{{if eq .GoType "time.Time"}}{{- $bb = true -}}{{- end -}}
{{- end -}}
{{- end -}}
{{- range .Columns -}}
{{if eq .GoType "time.Time"}}{{- $bb = true -}}{{- end -}}
{{- end -}}
{{- if eq $bb true -}}
"time"
{{- end }}
"go-admin/common/models"
)
type {{.ClassName}} struct {