fix(content): 固定预览集查询顺序

This commit is contained in:
Zhou Weidong committed 2026-10-21 16:03:06 +08:00
1 parent 7ae05698fa
commit 3303a91e3c
2 files changed
+15 -9

No files matched your search

@@ -107,7 +107,7 @@ public class AppCatalogService {
Drama drama = dramaService.getPublished(dramaId);
List<DramaEpisode> episodes = episodeService.listPublishedByDrama(dramaId);
Map<Long, Long> episodeCommentCounts = commentService.countByEpisodes(
episodes.stream().map(DramaEpisode::getId).toList());
episodes.stream().map(DramaEpisode::getId).sorted().toList());
String categoryName = categoryNameMap().getOrDefault(drama.getCategoryId(), "");
AppDramaDetailVO detail = new AppDramaDetailVO();
@@ -173,7 +173,7 @@ public class AppCatalogService {
List<Long> ids = dramas.stream().map(Drama::getId).toList();
Map<Long, DramaEpisode> previews = episodeService.firstPlayableByDramas(ids);
Map<Long, Long> commentCounts = commentService.countByEpisodes(
previews.values().stream().map(DramaEpisode::getId).toList());
previews.values().stream().map(DramaEpisode::getId).sorted().toList());
return dramas.stream()
.map(drama -> toCard(
drama, categoryNames, previews.get(drama.getId()), commentCounts))