diff --git a/src/main/java/com/haejwo/tripcometrue/domain/review/placereview/controller/PlaceReviewController.java b/src/main/java/com/haejwo/tripcometrue/domain/review/placereview/controller/PlaceReviewController.java index 880bfa6a..6cabddfa 100644 --- a/src/main/java/com/haejwo/tripcometrue/domain/review/placereview/controller/PlaceReviewController.java +++ b/src/main/java/com/haejwo/tripcometrue/domain/review/placereview/controller/PlaceReviewController.java @@ -1,8 +1,5 @@ package com.haejwo.tripcometrue.domain.review.placereview.controller; -import static org.springframework.http.HttpStatus.CREATED; -import static org.springframework.http.HttpStatus.MULTI_STATUS; - import com.haejwo.tripcometrue.domain.review.placereview.dto.request.DeletePlaceReviewRequestDto; import com.haejwo.tripcometrue.domain.review.placereview.dto.request.PlaceReviewRequestDto; import com.haejwo.tripcometrue.domain.review.placereview.dto.response.PlaceReviewListResponseDto; diff --git a/src/main/java/com/haejwo/tripcometrue/domain/review/placereview/dto/response/PlaceReviewListResponseDto.java b/src/main/java/com/haejwo/tripcometrue/domain/review/placereview/dto/response/PlaceReviewListResponseDto.java index 7602abcf..df42fdaa 100644 --- a/src/main/java/com/haejwo/tripcometrue/domain/review/placereview/dto/response/PlaceReviewListResponseDto.java +++ b/src/main/java/com/haejwo/tripcometrue/domain/review/placereview/dto/response/PlaceReviewListResponseDto.java @@ -1,6 +1,5 @@ package com.haejwo.tripcometrue.domain.review.placereview.dto.response; -import com.fasterxml.jackson.annotation.JsonFormat; import com.haejwo.tripcometrue.domain.review.placereview.entity.PlaceReview; import org.springframework.data.domain.Page; diff --git a/src/main/java/com/haejwo/tripcometrue/domain/review/placereview/entity/PlaceReview.java b/src/main/java/com/haejwo/tripcometrue/domain/review/placereview/entity/PlaceReview.java index e893a3bb..b710fae5 100644 --- a/src/main/java/com/haejwo/tripcometrue/domain/review/placereview/entity/PlaceReview.java +++ b/src/main/java/com/haejwo/tripcometrue/domain/review/placereview/entity/PlaceReview.java @@ -16,7 +16,7 @@ import static com.haejwo.tripcometrue.domain.review.global.PointType.ONLY_ONE_POINT; import static com.haejwo.tripcometrue.domain.review.global.PointType.TWO_POINTS; -import static jakarta.persistence.CascadeType.*; +import static jakarta.persistence.CascadeType.REMOVE; import static jakarta.persistence.FetchType.LAZY; @Getter diff --git a/src/main/java/com/haejwo/tripcometrue/domain/review/triprecordreview/entity/TripRecordReview.java b/src/main/java/com/haejwo/tripcometrue/domain/review/triprecordreview/entity/TripRecordReview.java index b4e67339..846ee42f 100644 --- a/src/main/java/com/haejwo/tripcometrue/domain/review/triprecordreview/entity/TripRecordReview.java +++ b/src/main/java/com/haejwo/tripcometrue/domain/review/triprecordreview/entity/TripRecordReview.java @@ -18,7 +18,7 @@ import static com.haejwo.tripcometrue.domain.review.global.PointType.ONLY_ONE_POINT; import static com.haejwo.tripcometrue.domain.review.global.PointType.TWO_POINTS; -import static jakarta.persistence.CascadeType.*; +import static jakarta.persistence.CascadeType.REMOVE; @Getter @Entity diff --git a/src/main/java/com/haejwo/tripcometrue/domain/review/triprecordreview/repository/TripRecordReviewRepository.java b/src/main/java/com/haejwo/tripcometrue/domain/review/triprecordreview/repository/TripRecordReviewRepository.java index d53fb17b..da3da156 100644 --- a/src/main/java/com/haejwo/tripcometrue/domain/review/triprecordreview/repository/TripRecordReviewRepository.java +++ b/src/main/java/com/haejwo/tripcometrue/domain/review/triprecordreview/repository/TripRecordReviewRepository.java @@ -15,16 +15,16 @@ @Repository public interface TripRecordReviewRepository extends JpaRepository, TripRecordReviewRepositoryCustom { - @Query("select trr from TripRecordReview trr join fetch trr.member m where trr.member = :member and trr.content is not null order by trr.createdAt desc") - Page findByMember(@Param("member") Member member, Pageable pageable); + @Query("select trr from TripRecordReview trr join fetch trr.member m where trr.member = :member and trr.content is not null order by trr.createdAt desc") + Page findByMember(@Param("member") Member member, Pageable pageable); - @Query("select trr.ratingScore from TripRecordReview trr where trr.member = :member and trr.tripRecord.id = :tripRecordId") - Optional findMyScoreByMemberAndTripRecordId(@Param("member") Member member, @Param("tripRecordId") Long tripRecordId); + @Query("select trr.ratingScore from TripRecordReview trr where trr.member = :member and trr.tripRecord.id = :tripRecordId") + Optional findMyScoreByMemberAndTripRecordId(@Param("member") Member member, @Param("tripRecordId") Long tripRecordId); - @Query("select trr from TripRecordReview trr where trr.tripRecord.id = :tripRecordId and trr.content is not null order by trr.createdAt desc limit 1") - Optional findTopByTripRecordIdOrderByCreatedAtDesc(@Param("tripRecordId") Long tripRecordId); + @Query("select trr from TripRecordReview trr where trr.tripRecord.id = :tripRecordId and trr.content is not null order by trr.createdAt desc limit 1") + Optional findTopByTripRecordIdOrderByCreatedAtDesc(@Param("tripRecordId") Long tripRecordId); - boolean existsByMemberAndTripRecord(Member member, TripRecord tripRecord); + boolean existsByMemberAndTripRecord(Member member, TripRecord tripRecord); - Long countByTripRecordId(Long tripRecordId); + Long countByTripRecordId(Long tripRecordId); }