|
|
@ -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 " + |
|
|
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 " + |
|
|
"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) " + |
|
|
"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(); |
|
|
MapSqlParameterSource map = new MapSqlParameterSource(); |
|
|
map.addValue("delta", searchFilter.getMaybePeriod()); |
|
|
map.addValue("delta", searchFilter.getMaybePeriod()); |
|
|
List<Long> profiles = searchFilter.getAccounts(profileService); |
|
|
List<Long> profiles = searchFilter.getAccounts(profileService); |
|
|
@ -62,7 +63,8 @@ public class GraphService { |
|
|
public List<VipPerPeriodStatistic> getVipOnPeriod(SearchFilter searchFilter) { |
|
|
public List<VipPerPeriodStatistic> getVipOnPeriod(SearchFilter searchFilter) { |
|
|
final String sql = "select date_trunc(:delta, timestamp) AS ts, :delta as period, count(*) as value, givemethod, amount from gived_vip " + |
|
|
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 " + |
|
|
"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(); |
|
|
MapSqlParameterSource map = new MapSqlParameterSource(); |
|
|
map.addValue("delta", searchFilter.getMaybePeriod()); |
|
|
map.addValue("delta", searchFilter.getMaybePeriod()); |
|
|
String profiles = searchFilter.getAccountsSteam2(profileService); |
|
|
String profiles = searchFilter.getAccountsSteam2(profileService); |
|
|
|