From e1c7d46660b6179c474894eb45090d78fef0692d Mon Sep 17 00:00:00 2001 From: ChiveHao Date: Wed, 28 Aug 2024 08:56:31 +0800 Subject: [PATCH] fix: rename method (#662) --- .../core/subject/service/impl/SubjectServiceImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/src/main/java/run/ikaros/server/core/subject/service/impl/SubjectServiceImpl.java b/server/src/main/java/run/ikaros/server/core/subject/service/impl/SubjectServiceImpl.java index 3f387d79c..3374abc15 100644 --- a/server/src/main/java/run/ikaros/server/core/subject/service/impl/SubjectServiceImpl.java +++ b/server/src/main/java/run/ikaros/server/core/subject/service/impl/SubjectServiceImpl.java @@ -130,7 +130,7 @@ public Mono findById(Long id) { .setTotalEpisodes((long) episodes.size()) .setEpisodes(episodes) .setCanRead(getSubjectCanReadByEpisodes(episodes))) - .flatMap(sub -> findMatchingEpisodCount(sub.getId()) + .flatMap(sub -> findMatchingEpisodeCount(sub.getId()) .map(sub::setMatchingEpisodes)) .switchIfEmpty(Mono.just(subject))) .checkpoint("FindEpisodeEntitiesBySubjectId") @@ -362,7 +362,7 @@ public Mono deleteById(Long id) { ; } - private Mono findMatchingEpisodCount(Long subjectId) { + private Mono findMatchingEpisodeCount(Long subjectId) { return episodeRepository.findAllBySubjectId(subjectId) .map(EpisodeEntity::getId) .filterWhen(epId -> attachmentReferenceRepository.existsByTypeAndReferenceId( @@ -386,7 +386,7 @@ public Mono> findAllByPageable(PagingWrap pagin .flatMap(subjectRepository::findById) .flatMap( subject -> ReactiveBeanUtils.copyProperties(subject, new SubjectMeta())) - .flatMap(subjectMeta -> findMatchingEpisodCount(subjectMeta.getId()) + .flatMap(subjectMeta -> findMatchingEpisodeCount(subjectMeta.getId()) .map(subjectMeta::setMatchingEpisodes)) .flatMap(subjectMeta -> episodeRepository.countBySubjectId(subjectMeta.getId()) .map(subjectMeta::setTotalEpisodes)) @@ -445,7 +445,7 @@ public Mono> listEntitiesByCondition(FindSubjectConditio return subjectEntityFlux.map(BaseEntity::getId) .flatMap(subjectRepository::findById) .flatMap(subject -> ReactiveBeanUtils.copyProperties(subject, new SubjectMeta())) - .flatMap(subjectMeta -> findMatchingEpisodCount(subjectMeta.getId()) + .flatMap(subjectMeta -> findMatchingEpisodeCount(subjectMeta.getId()) .map(subjectMeta::setMatchingEpisodes)) .flatMap(subjectMeta -> episodeRepository.countBySubjectId(subjectMeta.getId()) .map(subjectMeta::setTotalEpisodes))