//LikingArticles list the latest `limit` liking articles from offset `start`
LikingArticles list the latest `limit` liking articles from offset `start`
// LikingArticles list the latest ` limit ` liking articles from offset ` start `
func (user *User) LikingArticles(start, limit int64) ([]Article, error) {
	aids := cache.RedisClient.ZRevRange(cache.UserLikingArticlesKey(user.ID), start, start+limit).Val()
	var articles []Article
	if err := DB.Where("id in (?)", aids).Find(&articles).Error; err != nil {
		return nil, err
	}
	return articles, nil
}
func ( user * User ) LikingArticles ( start , limit int64 ) ( [ ] Article , error ) { aids := cache . RedisClient . ZRevRange ( cache . UserLikingArticlesKey ( user . ID ) , start , start + limit ) . Val ( ) var articles [ ] Article if err := DB . Where ( " " , aids ) . Find ( & articles ) . Error ; err != nil { return nil , err } return articles , nil }
LikingArticles list the latest `limit` liking articles from offset `start`
LikingArticles list the latest ` limit ` liking articles from offset ` start `