收藏夹中的截图

This commit is contained in:
2024-11-11 02:17:25 +08:00
parent a55f5f0a78
commit ca7ff275c6

View File

@@ -409,6 +409,7 @@ func NewSchema(config Config) (graphql.Schema, error) {
},
}),
Args: graphql.FieldConfigArgument{
"explorer_id": &graphql.ArgumentConfig{Type: graphql.Int, Description: "筛选图像中指定收藏夹的"},
"collect_id": &graphql.ArgumentConfig{Type: graphql.Int, Description: "筛选图像中指定收藏夹的"},
"collect": &graphql.ArgumentConfig{Type: graphql.Int, Description: "筛选图像中指定用户收藏过的"},
"praise": &graphql.ArgumentConfig{Type: graphql.Int, Description: "筛选图像中指定用户点赞过的"},
@@ -592,6 +593,14 @@ func NewSchema(config Config) (graphql.Schema, error) {
))
}
// 数据库中筛选:收藏夹中的截图
if p.Args["explorer_id"] != nil {
query = query.Join(goqu.T("web_collect"), goqu.On(
goqu.I("web_images.id").Eq(goqu.I("web_collect.image_id")),
goqu.I("web_collect.explorer_id").Eq(p.Args["explorer_id"]),
))
}
// 数据库中筛选:游戏设备
if p.Args["device"] != nil {
query = query.Join(goqu.T("web_article"), goqu.On(