Skip to content

Commit

Permalink
fix: 修复站内搜索用户之后,用户积分归0的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Liusiyuan-git committed Jan 24, 2023
1 parent 86eb83d commit c83c12b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/achievement/service/internal/data/achievement.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ func (r *achievementRepo) getAchievementListFromDb(ctx context.Context, unExists
Collect: item.Collect,
Follow: item.Follow,
Followed: item.Followed,
Score: item.Score,
})
}

Expand All @@ -381,6 +382,7 @@ func (r *achievementRepo) setAchievementListToCache(achievementList []*Achieveme
pipe.HSetNX(ctx, key, "view", item.View)
pipe.HSetNX(ctx, key, "follow", item.Follow)
pipe.HSetNX(ctx, key, "followed", item.Followed)
pipe.HSetNX(ctx, key, "score", item.Score)
pipe.Expire(ctx, key, time.Minute*30)
}
return nil
Expand Down

0 comments on commit c83c12b

Please sign in to comment.