7주차 미션 [이서]#22
Open
seoyoon127 wants to merge 12 commits into
Open
Conversation
yangjiae12
approved these changes
May 17, 2026
| } | ||
|
|
||
| public ReviewResDto.Pagination<ReviewInfo> getReviewList(Long storeId, Integer pageSize, String cursor, String query) { | ||
| if (cursor == null) cursor = "-1"; |
Member
There was a problem hiding this comment.
cursor 기본값을 컨트롤러의 @RequestParam(defaultValue = "-1")로 처리하면 서비스 로직이 더 깔끔해질 것 같습니다.
|
|
||
| if (!cursor.equals("-1")){ | ||
| String[] cursorSplit = cursor.split(":"); | ||
| switch (query.toLowerCase()){ |
Member
There was a problem hiding this comment.
query가 null일 경우 NPE가 발생할 수 있어, 기본값 지정이나 null 검증이 필요해 보입니다.
| } | ||
| nextCursor = "-1"; | ||
|
|
||
| if (!reviewList.isEmpty()) { |
Member
There was a problem hiding this comment.
마지막 페이지에서도 nextCursor가 생성될 수 있어, hasNext()가 true일 때만 생성하는 방식도 고려해볼 수 있을 것 같습니다!
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.
🚩 관련 이슈
📌 구현 결과
❓ 리뷰 요청
🤔 질문
💬 기타 공유 사항
노션 링크
(https://www.notion.so/makeus-challenge/7-35ab57f4596b8034b60fd3c56ca99fda)