Skip to content

Commit

Permalink
Merge pull request #53 from GOAT-WAAAM/dev/ldy/directory
Browse files Browse the repository at this point in the history
[FEAT] 파일(리뷰) 정보에 즐겨찾기 유무 포함
  • Loading branch information
leedy3838 authored Jul 25, 2024
2 parents 6ca78ac + c37cc97 commit 5420831
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ public record ReviewSimpleResponse(
Long reviewId,
String imageTitle,
String imageUrl,
Long reviewCnt
Long reviewCnt,
Boolean isStar
) {
public static ReviewSimpleResponse from(Review review) {
return new ReviewSimpleResponse(review.getId(), review.getTitle(), review.getImageUrl(), review.getReviewCnt());
}
public static ReviewSimpleResponse from(Review review) {
return new ReviewSimpleResponse(
review.getId(), review.getTitle(), review.getImageUrl(), review.getReviewCnt(), review.getIsStar());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public List<ReviewSimpleResponse> findAllReviewSimpleResponseBySortAndSearch(
review.id,
review.title,
review.imageInfo.imageUrl,
review.reviewCnt))
review.reviewCnt,
review.isStar))
.from(review)
.where(review.user.userId.eq(userId), searchExpression(parentDirectoryId, search))
.orderBy(sortExpression(sort))
Expand Down

0 comments on commit 5420831

Please sign in to comment.