From eba880ab1ae6deef7cd1ed9bda0089d8e3aa30ca Mon Sep 17 00:00:00 2001 From: insanity Date: Tue, 22 Aug 2017 18:55:16 +0900 Subject: [PATCH] probe service orderby --- .../java/com/loafle/overflow/module/probe/dao/ProbeDAO.java | 2 +- .../com/loafle/overflow/module/probe/service/ProbeService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/loafle/overflow/module/probe/dao/ProbeDAO.java b/src/main/java/com/loafle/overflow/module/probe/dao/ProbeDAO.java index 0badb67..36af79f 100644 --- a/src/main/java/com/loafle/overflow/module/probe/dao/ProbeDAO.java +++ b/src/main/java/com/loafle/overflow/module/probe/dao/ProbeDAO.java @@ -17,5 +17,5 @@ public interface ProbeDAO extends JpaRepository { Probe findByProbeKey(String probeKey); - List findAllByDomain(Domain domain); + List findAllByDomainOrderByIdDesc(Domain domain); } \ No newline at end of file diff --git a/src/main/java/com/loafle/overflow/module/probe/service/ProbeService.java b/src/main/java/com/loafle/overflow/module/probe/service/ProbeService.java index 0c05c03..96ca37c 100644 --- a/src/main/java/com/loafle/overflow/module/probe/service/ProbeService.java +++ b/src/main/java/com/loafle/overflow/module/probe/service/ProbeService.java @@ -23,7 +23,7 @@ public class ProbeService { public List readAllByDomain(Domain domain) { - return this.probeDAO.findAllByDomain(domain); + return this.probeDAO.findAllByDomainOrderByIdDesc(domain); } public Probe read(long id) {