7주차 미션 [빈]#27
Open
deli-minju wants to merge 3 commits into
Open
Conversation
yangjiae12
approved these changes
May 17, 2026
| @Override | ||
| public MissionResDto.MemberMissionPageResponse getMemberMissions(Long memberId, MemberMissionStatus status, Integer page) { | ||
| int pageNumber = Math.max(page, 1) - 1; | ||
| PageRequest pageRequest = PageRequest.of(pageNumber, 10); |
Member
There was a problem hiding this comment.
페이지 크기 10이 하드코딩 되어 있는데 상수로 분리하거나 클라이언트에서 사이즈를 받도록 수정하면 좋을 것 같습니다!
|
|
||
| @Override | ||
| public MissionResDto.MemberMissionPageResponse getMyChallengingMissions(MissionReqDto.MyChallengingMissionsRequest request) { | ||
| int pageNumber = request.page() - 1; |
Member
There was a problem hiding this comment.
다른 조회 메서드에서는 page 값을 보정하고 있는데, 여기서는 보정 없이 page - 1을 사용하고 있어 page가 0 이하일 때 예외가 발생할 수 있을 것 같습니다!
Comment on lines
+52
to
+53
| memberRepository.findById(request.memberId()) | ||
| .orElseThrow(() -> new ReviewException(ReviewErrorCode.MEMBER_NOT_FOUND)); |
Comment on lines
+87
to
+94
| List<Review> reviews = bothCursorEmpty | ||
| ? reviewRepository.findMyReviewsByScoreCursorFirst(request.memberId(), pageRequest) | ||
| : reviewRepository.findMyReviewsByScoreCursorNext( | ||
| request.memberId(), | ||
| request.cursorScore(), | ||
| request.cursorId(), | ||
| pageRequest | ||
| ); |
Member
There was a problem hiding this comment.
List로 받아서 hasNext를 직접 계산하고 있는데 반환 타입을 Slice로 변경해서 작성해도 좋을 것 같습니다!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚩 관련 이슈
📌 구현 결과
❓ 리뷰 요청
🤔 질문
💬 기타 공유 사항