Conversation
# Conflicts: # src/main/java/com/kau/capstone/entity/food/repository/FoodRepository.java
Closed
2 tasks
parkhs21
reviewed
May 9, 2025
| @@ -11,10 +11,10 @@ public record FoodResponse( | |||
| ) { | |||
|
|
|||
| public static FoodResponse toResponse(Food food) { | |||
| return FoodsResponse.builder() | ||
| .foods(foodResponses) | ||
| .build(); | ||
| return new FoodsResponse(foodResponses); |
Collaborator
There was a problem hiding this comment.
팩토리 메서드(of)로 사용하는 데, new를 사용하는 것은 잘못된 방식인 것 같아요.(record 타입 기본 생성자 private으로 변환 필요해 보임. 모든 인원이 해당 되며, @NoArgsConstructor 활용하면 될 듯 합니다.)
Comment on lines
+66
to
+70
| private void checkAmount(long amount, long point){ | ||
| if (amount < point) { | ||
| throw new PointNotEnoughExceptionV2(); | ||
| } | ||
| } |
Collaborator
There was a problem hiding this comment.
굳이 이 로직만 따로 함수화한 이유가 있나요?
Comment on lines
+28
to
+32
| public ResponseEntity<ApiResponse<Void>> payFoodWithPoints(@LoginUser LoginInfo loginInfo, | ||
| @PathVariable Long foodId, | ||
| @RequestBody DeliveryFeeRequest request) { | ||
| foodServiceV2.processPointPaymentForFood(loginInfo.memberId(), foodId, request.deliveryFee()); | ||
|
|
Collaborator
There was a problem hiding this comment.
controller랑 service랑 로직이 1대1로서 같은 의미인데, 메서드 명이 다른 것이 확인하기 힘든 것 같은데,,, 다들 어떻게 생각해요?
2dhhh
pushed a commit
that referenced
this pull request
May 9, 2025
2dhhh
pushed a commit
that referenced
this pull request
May 9, 2025
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.
#️⃣연관된 이슈
📝작업 내용
💬리뷰 요구사항(선택)