From 29d8aa40794445ce3bcedbbd6e34e6c7dd0051ac Mon Sep 17 00:00:00 2001 From: chuyan <1047381936@qq.com> Date: Fri, 11 Sep 2020 16:39:54 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ase/repository/student/NotificationRepository.java | 4 +--- src/main/java/com/codesdream/ase/service/StaticsService.java | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) 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(); } /**