Skip to content

Commit 4b4f355

Browse files
committed
refactor: batch 조회 후 조합하는 함수 이름 변경
1 parent 02a7354 commit 4b4f355

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/example/solidconnection/mentor/service/MentorQueryService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public MentorDetailResponse getMentorDetails(long mentorId, long currentUserId)
5555
public SliceResponse<MentorPreviewResponse> getMentorPreviews(String regionKoreanName, long currentUserId, Pageable pageable) {
5656
Slice<Mentor> mentorSlice = filterMentorsByRegion(regionKoreanName, pageable);
5757
List<Mentor> mentors = mentorSlice.toList();
58-
List<MentorPreviewResponse> content = getMentorPreviewResponses(mentors, currentUserId);
58+
List<MentorPreviewResponse> content = buildMentorPreviewsWithBatchQuery(mentors, currentUserId);
5959

6060
return SliceResponse.of(content, mentorSlice);
6161
}
@@ -69,7 +69,7 @@ private Slice<Mentor> filterMentorsByRegion(String regionKoreanName, Pageable pa
6969
return mentorRepository.findAllByRegion(region, pageable);
7070
}
7171

72-
private List<MentorPreviewResponse> getMentorPreviewResponses(List<Mentor> mentors, long currentUserId) { // todo: 이름 변경?
72+
private List<MentorPreviewResponse> buildMentorPreviewsWithBatchQuery(List<Mentor> mentors, long currentUserId) {
7373
Map<Long, SiteUser> mentorIdToSiteUser = mentorBatchQueryRepository.getMentorIdToSiteUserMap(mentors);
7474
Map<Long, University> mentorIdToUniversity = mentorBatchQueryRepository.getMentorIdToUniversityMap(mentors);
7575
Map<Long, Boolean> mentorIdToIsApplied = mentorBatchQueryRepository.getMentorIdToIsApplied(mentors, currentUserId);

0 commit comments

Comments
 (0)