diff --git a/src/main/java/app/controllers/other/PulseController.java b/src/main/java/app/controllers/other/PulseController.java index f87c85a..a7f826b 100644 --- a/src/main/java/app/controllers/other/PulseController.java +++ b/src/main/java/app/controllers/other/PulseController.java @@ -41,7 +41,7 @@ public class PulseController { this.waitAfterNextAspect = waitAfterNextAspect; } - @GetMapping("/db") + @GetMapping(value = {"/db", "/"}) public ResponseEntity getDBPulse() { return new ResponseEntity(dbService.getDBServerTime(), HttpStatus.OK); } diff --git a/src/main/java/app/services/db/GraphService.java b/src/main/java/app/services/db/GraphService.java index 4688d69..1236d78 100644 --- a/src/main/java/app/services/db/GraphService.java +++ b/src/main/java/app/services/db/GraphService.java @@ -34,7 +34,8 @@ public class GraphService { final String sql = "select date_trunc(:delta, timestamp) AS ts, :delta as period, sum(connect_duration) as value, srv_id from user_connections " + "where (:account_ids_empty = true or account_id in (:account_ids)) and connect_duration != 0 and timestamp between :begindate and :enddate " + "and (:srv_id like '' or srv_id like :srv_id) " + - "group by ts, srv_id"; + "group by ts, srv_id " + + "order by ts asc"; MapSqlParameterSource map = new MapSqlParameterSource(); map.addValue("delta", searchFilter.getMaybePeriod()); List profiles = searchFilter.getAccounts(profileService); @@ -62,7 +63,8 @@ public class GraphService { public List getVipOnPeriod(SearchFilter searchFilter) { final String sql = "select date_trunc(:delta, timestamp) AS ts, :delta as period, count(*) as value, givemethod, amount from gived_vip " + "where (:account_ids_empty = true or steam2 in (:account_ids)) and givemethod != 4 and timestamp between :begindate and :enddate " + - "group by ts, givemethod, amount"; + "group by ts, givemethod, amount " + + "order by ts asc"; MapSqlParameterSource map = new MapSqlParameterSource(); map.addValue("delta", searchFilter.getMaybePeriod()); String profiles = searchFilter.getAccountsSteam2(profileService);