feat(hot-rank): add per-channel hot ranking functionality
Some checks failed
Build Backend / build (push) Failing after 1m52s
Build Backend / build-docker (push) Has been skipped

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:
lafay
2026-04-26 11:39:41 +08:00
parent 02466603f9
commit 27ea8689f9
7 changed files with 329 additions and 70 deletions

View File

@@ -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(