diff --git a/src/main/java/com/codesdream/ase/repository/student/NotificationRepository.java b/src/main/java/com/codesdream/ase/repository/student/NotificationRepository.java index e0851fd..629d181 100644 --- a/src/main/java/com/codesdream/ase/repository/student/NotificationRepository.java +++ b/src/main/java/com/codesdream/ase/repository/student/NotificationRepository.java @@ -11,7 +11,5 @@ import java.util.Optional; public interface NotificationRepository extends JpaRepository { Optional findByTitle(String title); - List findAllByOrOrderByAnnouncementDateDesc(); - - List findAllByOrOrderByCreationDateDesc(); + List findAllByOrderByAnnouncementDateDesc(); } diff --git a/src/main/java/com/codesdream/ase/service/StaticsService.java b/src/main/java/com/codesdream/ase/service/StaticsService.java index f41fade..d36d56c 100644 --- a/src/main/java/com/codesdream/ase/service/StaticsService.java +++ b/src/main/java/com/codesdream/ase/service/StaticsService.java @@ -115,7 +115,7 @@ public class StaticsService { * @return 公告列表 */ public List displayNotification(){ - return notificationRepository.findAllByOrOrderByAnnouncementDateDesc(); + return notificationRepository.findAllByOrderByAnnouncementDateDesc(); } /**