Skip to content

Commit

Permalink
fix: 修复热门评论的BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
Lansongxx committed Apr 15, 2024
1 parent cfe3c59 commit 5bc6b65
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions biz/application/service/hot.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ func (s *HotService) IncrHotValue(ctx context.Context, req *gencontent.IncrHotVa
rankKey = consts.FileRankKey
case gencontent.TargetType_PostType:
rankKey = consts.PostRankKey
case gencontent.TargetType_CommentContentType:
rankKey = consts.CommentRankKey
}

value, ok := s.Cache.Get(rankKey)
Expand Down
1 change: 1 addition & 0 deletions biz/infrastructure/consts/field.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const (
UserRankKey = "cache:rank:user"
FileRankKey = "cache:rank:file"
PostRankKey = "cache:rank:post"
CommentRankKey = "cache:rank:comment"
)

var (
Expand Down

0 comments on commit 5bc6b65

Please sign in to comment.