Skip to content

Commit

Permalink
[#198] fix(ScheduleService): IsBooking update 로직 변경 및 불필요한 주석 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
hyerinhwang-sailin committed Aug 29, 2024
1 parent afed125 commit 29fb7a9
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 29fb7a9

Please sign in to comment.