Browse Source

blya

master
gsd 4 weeks ago
parent
commit
726eac4a11
  1. 3
      src/main/java/app/services/db/GraphService.java

3
src/main/java/app/services/db/GraphService.java

@ -46,7 +46,7 @@ public class GraphService {
@Cacheable(value = "graphs.usertime", key = "#searchFilter.cacheKey") //"graphs.usertime", "graphs.vip"
public List<PerPeriodStatistic> getUsertimeOnPeriod(SearchFilter searchFilter) {
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 migration_id is null and connect_duration != 0 and timestamp between :begindate and :enddate " +
"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 " +
"order by ts asc";
@ -67,7 +67,6 @@ public class GraphService {
final String sql = "select acc.ts, acc.period, count(acc.value) as value, acc.srv_id from (select date_trunc(:delta, timestamp) AS ts, :delta as period, count(account_id) as value, srv_id, account_id from user_connections " +
" where timestamp between :begindate and :enddate " +
" and (:account_ids_empty = true or account_id in (:account_ids))" +
" and migration_id is null " +
" and connect_duration > 0 " +
" and (:srv_id like '' or srv_id like :srv_id) " +
" group by ts, srv_id, account_id) as acc " +

Loading…
Cancel
Save