Skip to content

7주차 미션 [빈]#27

Open
deli-minju wants to merge 3 commits into
mainfrom
bean/week7
Open

7주차 미션 [빈]#27
deli-minju wants to merge 3 commits into
mainfrom
bean/week7

Conversation

@deli-minju
Copy link
Copy Markdown
Collaborator

@deli-minju deli-minju commented May 13, 2026

🚩 관련 이슈

📌 구현 결과

  • 오프셋 기반 내 미션 조회 구현
  • 커서 기반 내 리뷰 조회 구현
  • RequestBody Validation 및 전역 예외 처리 추가
스크린샷 2026-05-13 170900

❓ 리뷰 요청

🤔 질문

💬 기타 공유 사항

Copy link
Copy Markdown
Member

@yangjiae12 yangjiae12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다~

@Override
public MissionResDto.MemberMissionPageResponse getMemberMissions(Long memberId, MemberMissionStatus status, Integer page) {
int pageNumber = Math.max(page, 1) - 1;
PageRequest pageRequest = PageRequest.of(pageNumber, 10);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

페이지 크기 10이 하드코딩 되어 있는데 상수로 분리하거나 클라이언트에서 사이즈를 받도록 수정하면 좋을 것 같습니다!


@Override
public MissionResDto.MemberMissionPageResponse getMyChallengingMissions(MissionReqDto.MyChallengingMissionsRequest request) {
int pageNumber = request.page() - 1;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

다른 조회 메서드에서는 page 값을 보정하고 있는데, 여기서는 보정 없이 page - 1을 사용하고 있어 page가 0 이하일 때 예외가 발생할 수 있을 것 같습니다!

Comment on lines +52 to +53
memberRepository.findById(request.memberId())
.orElseThrow(() -> new ReviewException(ReviewErrorCode.MEMBER_NOT_FOUND));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

공통 로직으로 분리하면 좋을 것 같습니다!

Comment on lines +87 to +94
List<Review> reviews = bothCursorEmpty
? reviewRepository.findMyReviewsByScoreCursorFirst(request.memberId(), pageRequest)
: reviewRepository.findMyReviewsByScoreCursorNext(
request.memberId(),
request.cursorScore(),
request.cursorId(),
pageRequest
);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

List로 받아서 hasNext를 직접 계산하고 있는데 반환 타입을 Slice로 변경해서 작성해도 좋을 것 같습니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Mission] 7주차 미션

2 participants