diff --git a/src/main/java/KGUcapstone/OutDecision/domain/post/repository/PostRepository.java b/src/main/java/KGUcapstone/OutDecision/domain/post/repository/PostRepository.java index 9964443..4323665 100644 --- a/src/main/java/KGUcapstone/OutDecision/domain/post/repository/PostRepository.java +++ b/src/main/java/KGUcapstone/OutDecision/domain/post/repository/PostRepository.java @@ -10,6 +10,7 @@ import org.springframework.data.domain.PageRequest; import org.springframework.data.jpa.repository.Query; +import java.util.Date; import java.util.List; public interface PostRepository extends JpaRepository { @@ -23,4 +24,5 @@ public interface PostRepository extends JpaRepository { List findByHotTrue(Pageable p); List findTop6ByStatusOrderByDeadlineDesc(Status status, Pageable p); List findTop6ByStatusOrderByDeadlineAsc(Status status, Pageable p); + List findByStatusAndDeadlineBefore(Status status, Date currentDate); }