bug修复

This commit is contained in:
chuyan 2020-09-11 16:39:54 +08:00
parent 31e45ec6ad
commit 29d8aa4079
2 changed files with 2 additions and 4 deletions

View File

@ -11,7 +11,5 @@ import java.util.Optional;
public interface NotificationRepository extends JpaRepository<Notification, Integer> { public interface NotificationRepository extends JpaRepository<Notification, Integer> {
Optional<Notification> findByTitle(String title); Optional<Notification> findByTitle(String title);
List<Notification> findAllByOrOrderByAnnouncementDateDesc(); List<Notification> findAllByOrderByAnnouncementDateDesc();
List<Notification> findAllByOrOrderByCreationDateDesc();
} }

View File

@ -115,7 +115,7 @@ public class StaticsService {
* @return 公告列表 * @return 公告列表
*/ */
public List<Notification> displayNotification(){ public List<Notification> displayNotification(){
return notificationRepository.findAllByOrOrderByAnnouncementDateDesc(); return notificationRepository.findAllByOrderByAnnouncementDateDesc();
} }
/** /**