game 合并查询
This commit is contained in:
@@ -70,11 +70,6 @@ var articleType = graphql.NewObject(graphql.ObjectConfig{
|
||||
}
|
||||
return false, nil
|
||||
}},
|
||||
"text_count": &graphql.Field{Type: graphql.Int, Description: "文字数量", Resolve: func(p graphql.ResolveParams) (interface{}, error) {
|
||||
var count int64
|
||||
err := db.Table("web_images").Where("article_id = ?", p.Source.(Article).ID).Where("text != ''").Count(&count).Error
|
||||
return int(count), err
|
||||
}},
|
||||
},
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user