diff --git a/Makefile b/Makefile index 990edb6..0d1f17d 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ dev: wait link: - ssh -NCPf ai -L 3306:localhost:3306 -L 19530:localhost:19530 -L 4080:localhost:4080 -L 5002:localhost:5002 + ssh -NCPf ai -L 3306:localhost:3306 -L 19530:localhost:19530 -L 4080:localhost:4080 -L 5002:localhost:5002 -L 4306:localhost:4306 # 编译项目 build: diff --git a/api/graphql.go b/api/graphql.go index f87e36b..fbfedfe 100644 --- a/api/graphql.go +++ b/api/graphql.go @@ -516,7 +516,7 @@ func NewSchema(config Config) (graphql.Schema, error) { } // 如果没有外部排序则使用指定排序 - if p.Args["sort"] == nil && p.Args["similar"] == nil && p.Args["sort"] != nil && p.Args["order"] != nil { + if p.Args["text"] == nil && p.Args["similar"] == nil { query = query.Select("web_images.id", goqu.L( fmt.Sprintf("ROW_NUMBER() OVER(ORDER BY %s %s)", p.Args["sort"], p.Args["order"]), ).As("row_num"))