diff --git a/src/main/java/com/beat/domain/schedule/application/ScheduleService.java b/src/main/java/com/beat/domain/schedule/application/ScheduleService.java index 6d4f2b62..ffecd4c1 100644 --- a/src/main/java/com/beat/domain/schedule/application/ScheduleService.java +++ b/src/main/java/com/beat/domain/schedule/application/ScheduleService.java @@ -68,13 +68,12 @@ public boolean isBookingAvailable(Schedule schedule) { public void updateBookingStatus(Schedule schedule) { boolean isBookingAvailable = isBookingAvailable(schedule); if (schedule.isBooking() != isBookingAvailable) { - schedule.setBooking(isBookingAvailable); + schedule.updateIsBooking(isBookingAvailable); scheduleRepository.save(schedule); } } public int calculateDueDate(Schedule schedule) { - // LocalDate 객체를 사용하여 날짜 차이만 계산 int dueDate = (int) ChronoUnit.DAYS.between(LocalDate.now(), schedule.getPerformanceDate().toLocalDate()); return dueDate; }