diff --git a/src/main/java/in/koreatech/koin/domain/community/article/repository/ArticleRepository.java b/src/main/java/in/koreatech/koin/domain/community/article/repository/ArticleRepository.java index 26de4a070..242095306 100644 --- a/src/main/java/in/koreatech/koin/domain/community/article/repository/ArticleRepository.java +++ b/src/main/java/in/koreatech/koin/domain/community/article/repository/ArticleRepository.java @@ -122,7 +122,7 @@ default Article getNextArticle(Board board, Article article) { String getTitleById(@Param("id") Integer id); @Query(value = "SELECT * FROM new_articles a " - + "WHERE a.title REGEXP '통학버스|등교버스|셔틀버스|하교버스' " + + "WHERE a.title REGEXP '통학버스|등교버스|셔틀버스|하교버스' AND a.is_notice = true " + "ORDER BY a.created_at DESC LIMIT 5", nativeQuery = true) List
findBusArticlesTop5OrderByCreatedAtDesc(); }