修正筛选

This commit is contained in:
2024-11-10 10:38:24 +08:00
parent 661a124dd5
commit 6a6e9a5283

View File

@@ -435,8 +435,6 @@ func NewSchema(config Config) (graphql.Schema, error) {
Text string Text string
Interest int Interest int
Similar int Similar int
Follower int
Orientation string
Sort string Sort string
Order string Order string
} }
@@ -452,7 +450,8 @@ func NewSchema(config Config) (graphql.Schema, error) {
// 筛选条件 // 筛选条件
for _, format := range argFormat { for _, format := range argFormat {
if p.Args[format] != nil { if p.Args[format] != nil {
query.Where(goqu.Ex{fmt.Sprintf("web_images.%s = ?", format): p.Args[format]}) fmt.Println(format, p.Args[format])
query = query.Where(goqu.Ex{fmt.Sprintf("web_images.%s", format): p.Args[format]})
} }
} }