修正排序
This commit is contained in:
2
Makefile
2
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:
|
||||
|
@@ -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"))
|
||||
|
Reference in New Issue
Block a user