Skip to content

Commit

Permalink
fixed: 自动化请求结构中不应该携带JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelmaxQm committed Jun 11, 2024
1 parent f773a02 commit 725f6fe
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions server/resource/autocode_template/server/request.go.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package request
import (
"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
{{ if or .HasSearchTimer .GvaModel}}"time"{{ end }}
{{ if .NeedJSON }}"gorm.io/datatypes"{{ end }}
)

type {{.StructName}}Search struct{
Expand All @@ -23,16 +22,8 @@ type {{.StructName}}Search struct{
{{.FieldName}} string `json:"{{.FieldJson}}" form:"{{.FieldJson}}" `
{{- else if eq .FieldType "video" }}
{{.FieldName}} string `json:"{{.FieldJson}}" form:"{{.FieldJson}}" `
{{- else if eq .FieldType "file" }}
{{.FieldName}} datatypes.JSON `json:"{{.FieldJson}}" form:"{{.FieldJson}}" swaggertype:"array,object"`
{{- else if eq .FieldType "pictures" }}
{{.FieldName}} datatypes.JSON `json:"{{.FieldJson}}" form:"{{.FieldJson}}" swaggertype:"array,object"`
{{- else if eq .FieldType "richtext" }}
{{.FieldName}} string `json:"{{.FieldJson}}" form:"{{.FieldJson}}" `
{{- else if eq .FieldType "json" }}
{{.FieldName}} datatypes.JSON `json:"{{.FieldJson}}" form:"{{.FieldJson}}" swaggertype:"object"`
{{- else if eq .FieldType "array" }}
{{.FieldName}} datatypes.JSON `json:"{{.FieldJson}}" form:"{{.FieldJson}}" swaggertype:"array,object"`
{{- else if ne .FieldType "string" }}
{{.FieldName}} *{{.FieldType}} `json:"{{.FieldJson}}" form:"{{.FieldJson}}" `
{{- else }}
Expand Down

0 comments on commit 725f6fe

Please sign in to comment.