feat(interaction): 新增分集计数统计接口

This commit is contained in:
Zhou Weidong committed 2026-10-26 21:31:17 +08:00
1 parent 15b540cdd6
commit 2fe24b9db7
10 files changed
+299 -2

No files matched your search

@@ -158,6 +158,20 @@ public class EpisodeService implements EpisodeTranscodeCompletionPort, EpisodeVi
Wrappers.<DramaEpisode>lambdaQuery().in(DramaEpisode::getId, ids));
}
/** C 端:按 ID 批量取已上线剧集,用于只读统计。 */
public List<DramaEpisode> listPublishedByIds(Collection<Long> ids) {
if (ids == null || ids.isEmpty()) {
return List.of();
}
List<Long> normalized = ids.stream().filter(Objects::nonNull).distinct().toList();
if (normalized.isEmpty()) {
return List.of();
}
return dramaEpisodeMapper.selectList(Wrappers.<DramaEpisode>lambdaQuery()
.in(DramaEpisode::getId, normalized)
.eq(DramaEpisode::getStatus, ContentStatus.PUBLISHED.getCode()));
}
@Transactional(rollbackFor = Exception.class)
public Long create(EpisodeSaveReqVO req) {
dramaService.getExisting(req.getDramaId());