//CreateLike add {now, article id} pairs to user liking articles list
// and add {now, user id} pairs to article likers list
CreateLike add {now, article id} pairs to user liking articles list
and add {now, user id} pairs to article likers list
// CreateLike add { now article id } pairs to user liking articles list // and add { now user id } pairs to article likers list
func (article *Article) CreateLike(user *User) {
	pipe := cache.RedisClient.TxPipeline()
	defer func() {
		_, err := pipe.Exec()
		if err != nil {
			util.Log().Error("redis pipeline 执行失败", err)
		}
	}()
	now := float64(time.Now().Unix())
	cache.LinkZsets(
		pipe,
		cache.ArticleLikersKey(article.ID), now, user.ID,
		cache.UserLikingArticlesKey(user.ID), now, article.ID,
	)
}
func ( article * Article ) CreateLike ( user * User ) { pipe := cache . RedisClient . TxPipeline ( ) defer func ( ) { _ , err := pipe . Exec ( ) if err != nil { util . Log ( ) . Error ( " } } ( ) now := float64 ( time . Now ( ) . Unix ( ) ) cache . LinkZsets ( pipe , cache . ArticleLikersKey ( article . ID ) , now , user . ID , cache . UserLikingArticlesKey ( user . ID ) , now , article . ID , ) }
CreateLike add {now, article id} pairs to user liking articles list
and add {now, user id} pairs to article likers list
CreateLike add { now article id } pairs to user liking articles list and add { now user id } pairs to article likers list