returnjdbcTemplate.query("SELECT COUNT(*) as c FROM user_killfeed WHERE utime > ? AND attacker_id = ? AND attacker_id != victim_id AND server_id like ?",
returnjdbcTemplate.query("SELECT attacker_id, count(*) as c, server_id FROM user_killfeed WHERE victim_id != attacker_id AND attacker_id != 0 AND server_id LIKE ? GROUP BY attacker_id, server_id ORDER BY c DESC LIMIT 10",
returnjdbcTemplate.query("SELECT COUNT(*) as c FROM user_killfeed WHERE utime > ? AND victim_id = ? AND attacker_id != victim_id AND server_id like ?",
returnjdbcTemplate.query("SELECT victim_id, count(id) as c, server_id FROM user_killfeed WHERE victim_id != attacker_id AND victim_id != 0 AND server_id LIKE ? GROUP BY victim_id, server_id ORDER BY c DESC LIMIT 10",
List<HypeWeapons>result=jdbcTemplate.query("SELECT COUNT(u.weapon_index) as c, i.name, u.server_id, u.weapon_classname FROM user_killfeed as u INNER JOIN tf2idb.tf2idb_item as i ON u.weapon_index = i.id WHERE u.attacker_id = ? AND attacker_id != victim_id AND u.server_id like ? GROUP BY u.weapon_index, i.name, u.server_id, u.weapon_classname ORDER BY c DESC LIMIT ? OFFSET ?",
/*Longcount=(Long)createNativeQuery("SELECT COUNT(weapon_index) FROM user_killfeed WHERE attacker_id = ? AND server_id like ? GROUP BY weapon_index")
@ -94,12 +140,28 @@ public class KillfeedService {
elsecurrent_utime=Instant.now().getEpochSecond();
}
List<KillsInFeed>result=jdbcTemplate.query("SELECT -1, u.victim_id, u.assister_id, u.utime, i.name, u.server_id, u.weapon_classname FROM user_killfeed as u INNER JOIN tf2idb.tf2idb_item as i ON u.weapon_index = i.id WHERE u.utime > ? AND u.attacker_id = ? AND u.attacker_id != u.victim_id AND u.server_id like ? ORDER BY u.id DESC LIMIT ? OFFSET ?",
Longcount=jdbcTemplate.query("SELECT COUNT(*) as c FROM user_killfeed WHERE utime > ? AND attacker_id = ? AND attacker_id != victim_id AND server_id like ?",
@ -114,12 +176,28 @@ public class KillfeedService {
elsecurrent_utime=Instant.now().getEpochSecond();
}
List<KillsInFeed>result=jdbcTemplate.query("SELECT u.attacker_id, -1, u.assister_id, u.utime, i.name, u.server_id, u.weapon_classname FROM user_killfeed as u INNER JOIN tf2idb.tf2idb_item as i ON u.weapon_index = i.id WHERE u.utime > ? AND u.victim_id = ? AND u.attacker_id != u.victim_id AND u.server_id like ? ORDER BY u.id DESC LIMIT ? OFFSET ?",
Longcount=jdbcTemplate.query("SELECT COUNT(*) as c FROM user_killfeed WHERE utime > ? AND victim_id = ? AND attacker_id != victim_id AND server_id like ?",
@ -133,12 +211,28 @@ public class KillfeedService {
elsecurrent_utime=Instant.now().getEpochSecond();
}
List<KillsInFeed>result=jdbcTemplate.query("SELECT u.attacker_id, u.victim_id, -1, u.utime, i.name, u.server_id, u.weapon_classname FROM user_killfeed as u INNER JOIN tf2idb.tf2idb_item as i ON u.weapon_index = i.id WHERE u.utime > ? AND u.assister_id = ? AND u.server_id like ? ORDER BY u.id DESC LIMIT ? OFFSET ?",
List<Message>result=jdbcTemplate.query("SELECT account_id,utime,message,server_id FROM user_messages WHERE server_id like ? AND message LIKE ? ORDER BY user_messages.id DESC LIMIT ? OFFSET ?",
List<Message>result=jdbcTemplate.query("SELECT account_id,utime,message,server_id FROM user_messages WHERE account_id = ? AND server_id like ? AND message LIKE ? ORDER BY user_messages.id DESC LIMIT ? OFFSET ?",
returnjdbcTemplate_ro.query("SELECT avg(player_count) as player_count, cast(to_timestamp(utime) as date) as fulldate, utime as ts FROM servers_online WHERE player_count != 0 and server_id like ? GROUP BY cast(to_timestamp(utime) as date) / ? ORDER BY ts ASC",
returnjdbcTemplate_ro.query("SELECT avg(player_count) as player_count, cast(to_timestamp(utime) as date) as fulldate, utime as ts FROM servers_online WHERE player_count != 0 and server_id like ? GROUP BY cast(to_timestamp(utime) as date) / ? ORDER BY ts ASC",