Skip to content

7주차 미션 [이서]#22

Open
seoyoon127 wants to merge 12 commits into
mainfrom
leeseo/week7
Open

7주차 미션 [이서]#22
seoyoon127 wants to merge 12 commits into
mainfrom
leeseo/week7

Conversation

@seoyoon127
Copy link
Copy Markdown
Collaborator

🚩 관련 이슈

📌 구현 결과

  • Request Body가 있는 API에 검증 어노테이션 붙혀 검증하기
스크린샷 2026-05-08 114722
  • 내가 진행중인 미션 조회하기 (오프셋 기반)
스크린샷 2026-05-08 134741
  • 내가 생성한 리뷰들 조회하기 (커서 기반)
스크린샷 2026-05-08 143927

❓ 리뷰 요청

🤔 질문

💬 기타 공유 사항

노션 링크
(https://www.notion.so/makeus-challenge/7-35ab57f4596b8034b60fd3c56ca99fda)

@seoyoon127 seoyoon127 self-assigned this May 9, 2026
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.

수고하셨습니다~

}

public ReviewResDto.Pagination<ReviewInfo> getReviewList(Long storeId, Integer pageSize, String cursor, String query) {
if (cursor == null) cursor = "-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.

cursor 기본값을 컨트롤러의 @RequestParam(defaultValue = "-1")로 처리하면 서비스 로직이 더 깔끔해질 것 같습니다.


if (!cursor.equals("-1")){
String[] cursorSplit = cursor.split(":");
switch (query.toLowerCase()){
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.

query가 null일 경우 NPE가 발생할 수 있어, 기본값 지정이나 null 검증이 필요해 보입니다.

}
nextCursor = "-1";

if (!reviewList.isEmpty()) {
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.

마지막 페이지에서도 nextCursor가 생성될 수 있어, hasNext()가 true일 때만 생성하는 방식도 고려해볼 수 있을 것 같습니다!

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