Skip to content

Hotfix/mateboard : fetch join 수정#172

Merged
sete3683 merged 2 commits into
developfrom
hotfix/Mateboard
Apr 14, 2025
Merged

Hotfix/mateboard : fetch join 수정#172
sete3683 merged 2 commits into
developfrom
hotfix/Mateboard

Conversation

@zelly-log
Copy link
Copy Markdown
Collaborator

Hotfix/mateboard : fetch join 수정

🔘 Part

  • BE
  • Infra

🔎 PR Type

  • 새로운 기능 추가
  • 버그 수정
  • 주요 코드 리팩토링(성능 최적화 등)
  • 간단 코드 리팩토링(주석, 코드 컨벤션, 오타 수정 등)
  • 기타 (기타 사항 기입)

🔧 작업 내용 상세 작성

  • [레포 이름 #이슈번호](이슈 주소)

  • 작업 내용을 상세하게 작성해 주세요!

✔️ PR Checklist

  • 커밋 메세지를 컨벤션에 맞게 잘 적용 하였나요?

  • 테스트 코드 작성 / 단위 테스트 or 통합 테스트 진행 하셨나요?

@zelly-log zelly-log added the bug 버그 관련 label Apr 14, 2025
@zelly-log zelly-log requested a review from sete3683 April 14, 2025 01:21
@zelly-log zelly-log self-assigned this Apr 14, 2025

@Schema(description = "숙소 ID (TOUR API 기준)")
@JsonProperty("accomodationId")
@JsonProperty("accommodationId")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

띄어쓰기 오류 수정했습니다. accomodation이 아니라 accommodation입니다. 철자 검사 도구를 사용하는 것이 좋겠습니다.


@Schema(description = "숙소 이름")
@JsonProperty("accomodationName")
@JsonProperty("accommodationName")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

띄어쓰기 오류 수정했습니다. accomodation이 아니라 accommodation입니다. 철자 검사 도구를 사용하는 것이 좋겠습니다.


@Schema(description = "숙소 주소")
@JsonProperty("accomodationAddress")
@JsonProperty("accommodationAddress")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

띄어쓰기 오류 수정했습니다. accomodation이 아니라 accommodation입니다. 철자 검사 도구를 사용하는 것이 좋겠습니다.


@Schema(description = "숙소 이미지 URL")
@JsonProperty("accomodationImage")
@JsonProperty("accommodationImage")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

띄어쓰기 오류 수정했습니다. accomodation이 아니라 accommodation입니다. 철자 검사 도구를 사용하는 것이 좋겠습니다.

private boolean canCancel(Booking booking, LocalDate today) {
return booking.getBookingStatus().equals(BookingStatus.RESERVED)
&& booking.getPaymentStatus().equals("PAID")
&& booking.getPaymentStatus().equals("paid")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PAIDpaid로 변경한 이유가 무엇인가요? 일관성을 위해서라면 전체 코드에서 paymentStatus의 값을 소문자로 통일하는 것이 좋겠습니다. 만약 특별한 이유가 있다면 주석으로 설명을 추가해주세요.

@@ -4,7 +4,6 @@
import static com.frend.planit.domain.mateboard.post.entity.QMatePostLike.matePostLike;

import com.frend.planit.domain.image.entity.QImage;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HolderType import가 제거되었습니다. 이 변경의 이유와 영향을 분석해야 합니다. 이 import가 제거됨으로써 코드의 다른 부분에서 오류가 발생할 가능성이 있습니다. 해당 import를 제거하는 것이 정말로 필요한지 다시 한번 확인해주세요. 만약 필요하다면, 어떤 부분에서 사용되지 않는지 자세한 설명이 필요합니다.

.from(image)
.where(image.holderType.eq(HolderType.MATEBOARD)
.and(image.holderId.eq(mate.id)))
// .where(image.holderType.eq(HolderType.MATEBOARD)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

코드 블록이 주석 처리되었습니다. 이 부분을 주석 처리한 이유를 명확하게 설명해주세요. 만약 이 코드가 더 이상 필요하지 않다면, 완전히 제거하는 것이 더 깔끔합니다. 만약 나중에 필요할 수 있다면, 주석에 제거 이유와 함께 복구 방법에 대한 정보를 추가하는 것이 좋습니다. 현재로서는 왜 주석 처리를 했는지 불분명하여 코드의 가독성이 떨어집니다.

))
.from(mate)
.leftJoin(mate.writer, user).fetchJoin()
.leftJoin(mate.writer, user)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fetchJoin()이 제거되었습니다. 이 변경으로 인해 N+1 문제가 발생할 수 있습니다. fetchJoin()을 제거한 이유와 성능에 미치는 영향을 주석으로 명확히 설명해주세요. 만약 성능 문제가 예상된다면, 다른 방법 (예: @Fetch annotation 사용)을 고려하는 것이 좋습니다.

@sete3683 sete3683 merged commit 941cc14 into develop Apr 14, 2025
1 check passed
@zelly-log zelly-log deleted the hotfix/Mateboard branch April 14, 2025 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 버그 관련

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants