diff --git a/src/main/java/org/ktc2/cokaen/wouldyouin/advertisement/api/dto/AdvertisementRequest.java b/src/main/java/org/ktc2/cokaen/wouldyouin/advertisement/api/dto/AdvertisementRequest.java index 566ada93..27f58443 100644 --- a/src/main/java/org/ktc2/cokaen/wouldyouin/advertisement/api/dto/AdvertisementRequest.java +++ b/src/main/java/org/ktc2/cokaen/wouldyouin/advertisement/api/dto/AdvertisementRequest.java @@ -30,7 +30,7 @@ public class AdvertisementRequest { private LocalDateTime endTime; @AssertTrue(message = "종료 시간은 시작 시간 이후여야 합니다.") - public boolean isEndTimeAfterStartTime() { + private boolean isEndTimeAfterStartTime() { return endTime.isAfter(startTime); } diff --git a/src/main/java/org/ktc2/cokaen/wouldyouin/event/api/dto/EventCreateRequest.java b/src/main/java/org/ktc2/cokaen/wouldyouin/event/api/dto/EventCreateRequest.java index 3d877b03..d236ed3d 100644 --- a/src/main/java/org/ktc2/cokaen/wouldyouin/event/api/dto/EventCreateRequest.java +++ b/src/main/java/org/ktc2/cokaen/wouldyouin/event/api/dto/EventCreateRequest.java @@ -66,7 +66,7 @@ public class EventCreateRequest { private List imageIds; @AssertTrue(message = "종료 시간은 시작 시간 이후여야 합니다.") - public boolean isEndTimeAfterStartTime() { + private boolean isEndTimeAfterStartTime() { if (startTime == null || endTime == null) { return true; } @@ -74,7 +74,7 @@ public boolean isEndTimeAfterStartTime() { } @AssertTrue(message = "이미지는 최대 5개까지 등록할 수 있습니다.") - public boolean isImageSizeValid() { + private boolean isImageSizeValid() { return imageIds.size() <= 5; } diff --git a/src/main/java/org/ktc2/cokaen/wouldyouin/event/api/dto/EventEditRequest.java b/src/main/java/org/ktc2/cokaen/wouldyouin/event/api/dto/EventEditRequest.java index afec07f6..f06e9eab 100644 --- a/src/main/java/org/ktc2/cokaen/wouldyouin/event/api/dto/EventEditRequest.java +++ b/src/main/java/org/ktc2/cokaen/wouldyouin/event/api/dto/EventEditRequest.java @@ -62,7 +62,7 @@ public class EventEditRequest { private List imageIds; @AssertTrue(message = "종료 시간은 시작 시간 이후여야 합니다.") - public boolean isEndTimeAfterStartTime() { + private boolean isEndTimeAfterStartTime() { if (startTime == null || endTime == null) { return true; } @@ -70,7 +70,7 @@ public boolean isEndTimeAfterStartTime() { } @AssertTrue(message = "이미지는 최대 5개까지 등록할 수 있습니다.") - public boolean isImageSizeValid() { + private boolean isImageSizeValid() { return imageIds.size() <= 5; } } \ No newline at end of file diff --git a/src/main/java/org/ktc2/cokaen/wouldyouin/review/application/ReviewService.java b/src/main/java/org/ktc2/cokaen/wouldyouin/review/application/ReviewService.java index c2178751..f542eced 100644 --- a/src/main/java/org/ktc2/cokaen/wouldyouin/review/application/ReviewService.java +++ b/src/main/java/org/ktc2/cokaen/wouldyouin/review/application/ReviewService.java @@ -59,7 +59,7 @@ private Long getLastId(Slice reviews, Long oldLastId) { return oldLastId; } - @Transactional + @Transactional(readOnly = true) public ReviewEventSliceResponse getUnreviewedEventsByMemberId(Long memberId, Pageable pageable, Long beforeLastId) { Slice unreviewedEvents = reviewRepository.findUnreviewedEventsByMemberId(memberId, @@ -95,8 +95,7 @@ public void delete(Long memberId, Long reviewId) { reviewRepository.deleteById(reviewId); } - @Transactional - public Review getByIdOrThrow(Long id) { + private Review getByIdOrThrow(Long id) { return reviewRepository.findById(id) .orElseThrow(() -> new EntityNotFoundException("해당하는 리뷰를 찾을 수 없습니다.")); }