【fix】最新公告依然查询查询无效公告修复
This commit is contained in:
parent
c253f1363e
commit
05f46be012
|
@ -33,7 +33,7 @@ public class SystemAnnouncementRepositoryImpl implements SystemAnnouncementRepos
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Optional<SystemAnnouncement> findNew() {
|
public Optional<SystemAnnouncement> findNew() {
|
||||||
return jdbcSystemAnnouncementRepository.findTopByOrderByAnnouncementIdDesc();
|
return jdbcSystemAnnouncementRepository.findTopByStatusOrderByAnnouncementIdDesc("1");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -9,7 +9,7 @@ import java.util.Optional;
|
||||||
|
|
||||||
@Repository
|
@Repository
|
||||||
public interface JdbcSystemAnnouncementRepository extends CrudRepository<SystemAnnouncement, Long> {
|
public interface JdbcSystemAnnouncementRepository extends CrudRepository<SystemAnnouncement, Long> {
|
||||||
Optional<SystemAnnouncement> findTopByOrderByAnnouncementIdDesc();
|
Optional<SystemAnnouncement> findTopByStatusOrderByAnnouncementIdDesc(String status);
|
||||||
|
|
||||||
List<SystemAnnouncement> findByStatus(String status);
|
List<SystemAnnouncement> findByStatus(String status);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue