Skip to content

Commit

Permalink
Fix: 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
nohy6630 committed May 17, 2024
1 parent e2d7970 commit 777deb6
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import static java.time.format.DateTimeFormatter.ofPattern;

@RequiredArgsConstructor
@AllArgsConstructor
@Getter
@Builder
Expand All @@ -29,7 +28,7 @@ public class ActivitySummaryRes {

private String activityThumbnail;

private boolean isLiked = false;
private boolean isLiked;

public static ActivitySummaryRes of(Activity activity, boolean isLiked) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public ResponseEntity<ReadReviewsByMeRes> readReviewsByMe() {
.ok(reviewService.readReviewsByMe());
}


// @Operation(summary = "나의 후기 보기", description = """
// 나의 후기 보기 api 입니다.
// """)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public class Review {

private String appointmentDetail;

@Enumerated(EnumType.STRING)
private ExperienceType appointmentType;

private String appointmentTitle;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
import java.util.List;

public interface ReviewRepositoryCustom {
List<Review> findReviewsByUserId(Long userId, String type);
//List<Review> findReviewsByUserId(Long userId, String type);
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@
public class ReviewRepositoryImpl implements ReviewRepositoryCustom {
private final JPAQueryFactory jpaQueryFactory;

@Override
public List<Review> findReviewsByUserId(Long userId, String type) {
BooleanBuilder builder = new BooleanBuilder();

builder.and(experience.user.id.eq(userId));

if (type != null) {
builder.and(experience.type.eq(ExperienceType.of(type)));
}

return jpaQueryFactory
.selectFrom(review)
.join(review.mentor, experience)
.fetchJoin()
.where(builder)
.fetch();
}
// @Override
// public List<Review> findReviewsByUserId(Long userId, String type) {
// BooleanBuilder builder = new BooleanBuilder();
//
// builder.and(experience.user.id.eq(userId));
//
// if (type != null) {
// builder.and(experience.type.eq(ExperienceType.of(type)));
// }
//
// return jpaQueryFactory
// .selectFrom(review)
// .join(review.mentor, experience)
// .fetchJoin()
// .where(builder)
// .fetch();
// }

}

0 comments on commit 777deb6

Please sign in to comment.