-
Notifications
You must be signed in to change notification settings - Fork 5
Hotfix/mateboard : fetch join 수정 #172
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -75,19 +75,19 @@ public static class CustomData { | |
| private Long userId; | ||
|
|
||
| @Schema(description = "숙소 ID (TOUR API 기준)") | ||
| @JsonProperty("accomodationId") | ||
| @JsonProperty("accommodationId") | ||
| private Long accommodationId; | ||
|
|
||
| @Schema(description = "숙소 이름") | ||
| @JsonProperty("accomodationName") | ||
| @JsonProperty("accommodationName") | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 띄어쓰기 오류 수정했습니다. |
||
| private String accommodationName; | ||
|
|
||
| @Schema(description = "숙소 주소") | ||
| @JsonProperty("accomodationAddress") | ||
| @JsonProperty("accommodationAddress") | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 띄어쓰기 오류 수정했습니다. |
||
| private String accommodationAddress; | ||
|
|
||
| @Schema(description = "숙소 이미지 URL") | ||
| @JsonProperty("accomodationImage") | ||
| @JsonProperty("accommodationImage") | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 띄어쓰기 오류 수정했습니다. |
||
| private String accommodationImage; | ||
|
|
||
| @Schema(description = "체크인 날짜") | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -54,7 +54,7 @@ public BookingListResponseDto getMyBookings(Long userId) { | |
|
|
||
| private boolean canCancel(Booking booking, LocalDate today) { | ||
| return booking.getBookingStatus().equals(BookingStatus.RESERVED) | ||
| && booking.getPaymentStatus().equals("PAID") | ||
| && booking.getPaymentStatus().equals("paid") | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| && booking.getCheckInDate().isAfter(today); | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,6 @@ | |
| import static com.frend.planit.domain.mateboard.post.entity.QMatePostLike.matePostLike; | ||
|
|
||
| import com.frend.planit.domain.image.entity.QImage; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. HolderType import가 제거되었습니다. 이 변경의 이유와 영향을 분석해야 합니다. 이 import가 제거됨으로써 코드의 다른 부분에서 오류가 발생할 가능성이 있습니다. 해당 import를 제거하는 것이 정말로 필요한지 다시 한번 확인해주세요. 만약 필요하다면, 어떤 부분에서 사용되지 않는지 자세한 설명이 필요합니다. |
||
| import com.frend.planit.domain.image.type.HolderType; | ||
| import com.frend.planit.domain.mateboard.application.entity.MateApplicationStatus; | ||
| import com.frend.planit.domain.mateboard.application.entity.QMateApplication; | ||
| import com.frend.planit.domain.mateboard.post.dto.response.MateResponseDto; | ||
|
|
@@ -101,8 +100,8 @@ public Page<MateResponseDto> searchMatePosts(String keyword, String status, Stri | |
| JPAExpressions | ||
| .select(image.url) | ||
| .from(image) | ||
| .where(image.holderType.eq(HolderType.MATEBOARD) | ||
| .and(image.holderId.eq(mate.id))) | ||
| // .where(image.holderType.eq(HolderType.MATEBOARD) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 코드 블록이 주석 처리되었습니다. 이 부분을 주석 처리한 이유를 명확하게 설명해주세요. 만약 이 코드가 더 이상 필요하지 않다면, 완전히 제거하는 것이 더 깔끔합니다. 만약 나중에 필요할 수 있다면, 주석에 제거 이유와 함께 복구 방법에 대한 정보를 추가하는 것이 좋습니다. 현재로서는 왜 주석 처리를 했는지 불분명하여 코드의 가독성이 떨어집니다. |
||
| // .and(image.holderId.eq(mate.id))) | ||
| .orderBy(image.id.asc()) | ||
| .limit(1), | ||
| user.nickname, | ||
|
|
@@ -114,7 +113,7 @@ public Page<MateResponseDto> searchMatePosts(String keyword, String status, Stri | |
| mate.createdAt | ||
| )) | ||
| .from(mate) | ||
| .leftJoin(mate.writer, user).fetchJoin() | ||
| .leftJoin(mate.writer, user) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| .leftJoin(mateComment).on(mateComment.mate.eq(mate)) | ||
| .leftJoin(matePostLike).on(matePostLike.matePost.eq(mate)) | ||
| .where(builder) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
띄어쓰기 오류 수정했습니다.
accomodation이 아니라accommodation입니다. 철자 검사 도구를 사용하는 것이 좋겠습니다.