feat(hot-rank): add per-channel hot ranking functionality
Add channel-specific hot post filtering and ranking across the posts listing flow. Introduce refreshChannelRanks to compute per-channel hot scores, new Redis cache keys for channel hot ranks, and update repository/service/handler layers to accept channelID filtering parameters. Update HotRankWorker dependency injection to include ChannelRepository.
This commit is contained in:
@@ -370,8 +370,8 @@ func ProvideLogService(
|
||||
}
|
||||
|
||||
// ProvideQRCodeLoginService 提供二维码登录服务
|
||||
func ProvideHotRankWorker(cfg *config.Config, postRepo repository.PostRepository, cacheBackend cache.Cache) *service.HotRankWorker {
|
||||
return service.NewHotRankWorker(cfg, postRepo, cacheBackend)
|
||||
func ProvideHotRankWorker(cfg *config.Config, postRepo repository.PostRepository, channelRepo repository.ChannelRepository, cacheBackend cache.Cache) *service.HotRankWorker {
|
||||
return service.NewHotRankWorker(cfg, postRepo, channelRepo, cacheBackend)
|
||||
}
|
||||
|
||||
func ProvideQRCodeLoginService(
|
||||
|
||||
Reference in New Issue
Block a user