Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,19 @@ public static class CustomData {
private Long userId;

@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입니다. 철자 검사 도구를 사용하는 것이 좋겠습니다.

private Long accommodationId;

@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입니다. 철자 검사 도구를 사용하는 것이 좋겠습니다.

private String accommodationName;

@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입니다. 철자 검사 도구를 사용하는 것이 좋겠습니다.

private String accommodationAddress;

@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 String accommodationImage;

@Schema(description = "체크인 날짜")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
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의 값을 소문자로 통일하는 것이 좋겠습니다. 만약 특별한 이유가 있다면 주석으로 설명을 추가해주세요.

&& booking.getCheckInDate().isAfter(today);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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를 제거하는 것이 정말로 필요한지 다시 한번 확인해주세요. 만약 필요하다면, 어떤 부분에서 사용되지 않는지 자세한 설명이 필요합니다.

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;
Expand Down Expand Up @@ -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)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The 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,
Expand All @@ -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)
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 사용)을 고려하는 것이 좋습니다.

.leftJoin(mateComment).on(mateComment.mate.eq(mate))
.leftJoin(matePostLike).on(matePostLike.matePost.eq(mate))
.where(builder)
Expand Down