Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

리뷰 전체 조회에서 coupleName 필드 변경 #187

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ public ReviewResponse.FindAllByPlannerDTO getFindAllByPlannerDTO(List<Review> re
}

public ReviewResponse.FindAllByCoupleDTO getFindAllByCoupleDTO(List<Review> reviews, List<ReviewImageItem> reviewImageItems) {
List<ReviewResponse.FindByUserDTO> reviewDTOS = reviews.stream()
.map(review -> new ReviewResponse.FindByUserDTO(
List<ReviewResponse.FindByPlannerDTO> reviewDTOS = reviews.stream()
.map(review -> new ReviewResponse.FindByPlannerDTO(
review.id,
(review.getMatch().getPlanner() != null) ? review.getMatch().getPlanner().getUsername() : "탈퇴한 사용자" ,
review.stars,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public record FindAllByPlannerDTO(
) {}

public record FindAllByCoupleDTO(
List<FindByUserDTO> reviews
List<FindByPlannerDTO> reviews
) {}

public record FindByUserDTO(
Expand All @@ -19,6 +19,14 @@ public record FindByUserDTO(
List<String> images
) {}

public record FindByPlannerDTO(
Long id,
String plannerName,
Integer stars,
String content,
List<String> images
) {}

public record ReviewDTO(
Long id,
Long portfolioId,
Expand Down
Loading