From 05f46be012701c2d0aaa64a754039b5425d79a22 Mon Sep 17 00:00:00 2001 From: nixj Date: Wed, 29 May 2024 14:53:20 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90fix=E3=80=91=E6=9C=80=E6=96=B0?= =?UTF-8?q?=E5=85=AC=E5=91=8A=E4=BE=9D=E7=84=B6=E6=9F=A5=E8=AF=A2=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=97=A0=E6=95=88=E5=85=AC=E5=91=8A=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../repository/SystemAnnouncementRepositoryImpl.java | 2 +- .../repository/jdbc/JdbcSystemAnnouncementRepository.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/chint/infrastructure/repository/SystemAnnouncementRepositoryImpl.java b/src/main/java/com/chint/infrastructure/repository/SystemAnnouncementRepositoryImpl.java index d54117f3..9686d8b1 100644 --- a/src/main/java/com/chint/infrastructure/repository/SystemAnnouncementRepositoryImpl.java +++ b/src/main/java/com/chint/infrastructure/repository/SystemAnnouncementRepositoryImpl.java @@ -33,7 +33,7 @@ public class SystemAnnouncementRepositoryImpl implements SystemAnnouncementRepos @Override public Optional findNew() { - return jdbcSystemAnnouncementRepository.findTopByOrderByAnnouncementIdDesc(); + return jdbcSystemAnnouncementRepository.findTopByStatusOrderByAnnouncementIdDesc("1"); } @Override diff --git a/src/main/java/com/chint/infrastructure/repository/jdbc/JdbcSystemAnnouncementRepository.java b/src/main/java/com/chint/infrastructure/repository/jdbc/JdbcSystemAnnouncementRepository.java index e77f117b..5bfa9e07 100644 --- a/src/main/java/com/chint/infrastructure/repository/jdbc/JdbcSystemAnnouncementRepository.java +++ b/src/main/java/com/chint/infrastructure/repository/jdbc/JdbcSystemAnnouncementRepository.java @@ -9,7 +9,7 @@ import java.util.Optional; @Repository public interface JdbcSystemAnnouncementRepository extends CrudRepository { - Optional findTopByOrderByAnnouncementIdDesc(); + Optional findTopByStatusOrderByAnnouncementIdDesc(String status); List findByStatus(String status); }