feature: 내 리뷰 내역 조회 api#132
Open
Conversation
Test Results 64 files ±0 64 suites ±0 25s ⏱️ -1s For more details on these failures, see this check. Results for commit 129d715. ± Comparison against base commit 35f447a. |
hgo641
approved these changes
May 16, 2024
Contributor
hgo641
left a comment
There was a problem hiding this comment.
코드가 깔끔해서 읽기 쉬웠어요!! 👍
고생하셨습니다!
| val memberProductReviews = memberProductReviewsResponse.memberProductReviews | ||
|
|
||
| memberProductReviews.size shouldBe 2 | ||
|
|
Contributor
There was a problem hiding this comment.
여기 아래 memberProductReviews검증하는 코드가 조큼 긴데
음... 메서드로 분리하면 어떨까요??
valdiateMemberProductReview(memberProductReviewB, productReivewB, orderB);
Member
There was a problem hiding this comment.
- 조회 데이터에 대한 검증은 모든 필드를 할 필요는 없다고 생각합니다!
| ).whereAnd( | ||
| productReviewIdLt(paging.lastViewedId), | ||
| ).orderBy( | ||
| path(ProductReview::createdAt).desc(), |
Contributor
There was a problem hiding this comment.
createdAt 대신 id로 정렬해도 무방한 거 맞을까요??
id가 인덱스라 더 효율적일 것 같아서요!
|
|
||
| private fun getImagesByReview(reviewsByCondition: List<ProductReviewWithMemberResponse>): Map<Long, List<String>> { | ||
| val productReviewIds = reviewsByCondition.map { it.id } | ||
| private fun getImagesByReviewIds(productReviewIds: List<Long>): Map<Long, List<String>> { |
TaeyeonRoyce
approved these changes
May 17, 2024
Member
TaeyeonRoyce
left a comment
There was a problem hiding this comment.
고생하셨습니다!
코드 깔끔하네요👍👍
테스트만 통과하게 수정하면 될 것 같습니다!
| @Operation(summary = "내 후기 조회 API", description = "내가 작성한 상품의 후기를 조회합니다") | ||
| @ApiResponse(responseCode = "200", description = "상품 후기 조건 조회 성공") | ||
| @SecurityRequirement(name = ACCESS_TOKEN_SECURITY_SCHEME_KEY) | ||
| @GetMapping("/product-reviews/me") |
| val memberProductReviews = memberProductReviewsResponse.memberProductReviews | ||
|
|
||
| memberProductReviews.size shouldBe 2 | ||
|
|
Member
There was a problem hiding this comment.
- 조회 데이터에 대한 검증은 모든 필드를 할 필요는 없다고 생각합니다!
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.
📌 관련 이슈
📁 작업 설명
📸 작업화면
기타
기획적으로 명확하지 않은 부분은 기획자분께 문의해두었습니다. 확인되면 반영할게요!
