过滤非文章图片
This commit is contained in:
		@@ -485,7 +485,7 @@ func NewSchema(config Config) (graphql.Schema, error) {
 | 
			
		||||
						SELECT JSON_ARRAYAGG(web_images.id) AS json_result
 | 
			
		||||
						FROM web_fans
 | 
			
		||||
						INNER JOIN web_images ON web_images.user_id = web_fans.blogger_id
 | 
			
		||||
						WHERE web_fans.follower_id = ?
 | 
			
		||||
						WHERE web_fans.follower_id = ? AND web_images.article_id IS NOT NULL
 | 
			
		||||
					`, args.Follower).Scan(&item).Error; err != nil {
 | 
			
		||||
						fmt.Println("获取关注列表失败", err)
 | 
			
		||||
						return nil, err
 | 
			
		||||
@@ -567,7 +567,7 @@ func NewSchema(config Config) (graphql.Schema, error) {
 | 
			
		||||
 | 
			
		||||
				// 存在外部筛选条件
 | 
			
		||||
				if len(id_list) > 0 && len(list) > 0 {
 | 
			
		||||
					query = query.Where("id IN ?", list)
 | 
			
		||||
					query = query.Where("id IN ?", list).Where("article_id IS NOT NULL")
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				for index, item := range LoadItem(p.Info.FieldASTs[0].SelectionSet.Selections) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user