diff --git a/src/main/java/mvc/promiseme/calendar/repository/CalendarRepository.java b/src/main/java/mvc/promiseme/calendar/repository/CalendarRepository.java index c7af2b5..5fd05e0 100644 --- a/src/main/java/mvc/promiseme/calendar/repository/CalendarRepository.java +++ b/src/main/java/mvc/promiseme/calendar/repository/CalendarRepository.java @@ -6,9 +6,13 @@ import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; +import java.time.LocalDate; import java.util.List; +import java.util.Optional; + public interface CalendarRepository extends JpaRepository { // @Query("SELECT NEW mvc.promiseme.calendar.dto.CalendarResponseDTO(c.content, c.startDate, c.finishDate, u.nickname) from Calendar c join c.member m join m.users u where c.project = :project") // List findByProject(Project project); +List findByProjectAndStartDateLessThanEqualAndFinishDateGreaterThanEqual(Project project, LocalDate startDate, LocalDate finishDate); }