Hotfix/mateboard : fetch join 수정#172
Conversation
|
|
||
| @Schema(description = "숙소 ID (TOUR API 기준)") | ||
| @JsonProperty("accomodationId") | ||
| @JsonProperty("accommodationId") |
There was a problem hiding this comment.
띄어쓰기 오류 수정했습니다. accomodation이 아니라 accommodation입니다. 철자 검사 도구를 사용하는 것이 좋겠습니다.
|
|
||
| @Schema(description = "숙소 이름") | ||
| @JsonProperty("accomodationName") | ||
| @JsonProperty("accommodationName") |
There was a problem hiding this comment.
띄어쓰기 오류 수정했습니다. accomodation이 아니라 accommodation입니다. 철자 검사 도구를 사용하는 것이 좋겠습니다.
|
|
||
| @Schema(description = "숙소 주소") | ||
| @JsonProperty("accomodationAddress") | ||
| @JsonProperty("accommodationAddress") |
There was a problem hiding this comment.
띄어쓰기 오류 수정했습니다. accomodation이 아니라 accommodation입니다. 철자 검사 도구를 사용하는 것이 좋겠습니다.
|
|
||
| @Schema(description = "숙소 이미지 URL") | ||
| @JsonProperty("accomodationImage") | ||
| @JsonProperty("accommodationImage") |
There was a problem hiding this comment.
띄어쓰기 오류 수정했습니다. accomodation이 아니라 accommodation입니다. 철자 검사 도구를 사용하는 것이 좋겠습니다.
| 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.
PAID를 paid로 변경한 이유가 무엇인가요? 일관성을 위해서라면 전체 코드에서 paymentStatus의 값을 소문자로 통일하는 것이 좋겠습니다. 만약 특별한 이유가 있다면 주석으로 설명을 추가해주세요.
| @@ -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.
HolderType import가 제거되었습니다. 이 변경의 이유와 영향을 분석해야 합니다. 이 import가 제거됨으로써 코드의 다른 부분에서 오류가 발생할 가능성이 있습니다. 해당 import를 제거하는 것이 정말로 필요한지 다시 한번 확인해주세요. 만약 필요하다면, 어떤 부분에서 사용되지 않는지 자세한 설명이 필요합니다.
| .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.
코드 블록이 주석 처리되었습니다. 이 부분을 주석 처리한 이유를 명확하게 설명해주세요. 만약 이 코드가 더 이상 필요하지 않다면, 완전히 제거하는 것이 더 깔끔합니다. 만약 나중에 필요할 수 있다면, 주석에 제거 이유와 함께 복구 방법에 대한 정보를 추가하는 것이 좋습니다. 현재로서는 왜 주석 처리를 했는지 불분명하여 코드의 가독성이 떨어집니다.
| )) | ||
| .from(mate) | ||
| .leftJoin(mate.writer, user).fetchJoin() | ||
| .leftJoin(mate.writer, user) |
There was a problem hiding this comment.
fetchJoin()이 제거되었습니다. 이 변경으로 인해 N+1 문제가 발생할 수 있습니다. fetchJoin()을 제거한 이유와 성능에 미치는 영향을 주석으로 명확히 설명해주세요. 만약 성능 문제가 예상된다면, 다른 방법 (예: @Fetch annotation 사용)을 고려하는 것이 좋습니다.
Hotfix/mateboard : fetch join 수정
🔘 Part
🔎 PR Type
🔧 작업 내용 상세 작성
[레포 이름 #이슈번호](이슈 주소)
작업 내용을 상세하게 작성해 주세요!
✔️ PR Checklist
커밋 메세지를 컨벤션에 맞게 잘 적용 하였나요?
테스트 코드 작성 / 단위 테스트 or 통합 테스트 진행 하셨나요?