Browse Source

hype 3

master
gsd 2 years ago
parent
commit
4f7b4a8662
  1. 4
      src/main/java/app/services/db/DetectService.java

4
src/main/java/app/services/db/DetectService.java

@ -6,7 +6,9 @@ import jakarta.persistence.EntityManager;
import jakarta.persistence.PersistenceContext;
import org.springframework.stereotype.Service;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@Service
public class DetectService {
@ -23,7 +25,7 @@ public class DetectService {
public List getAttachedDiscordAccountPerSteam(SteamID steamID) {
return entityManager.createNativeQuery("SELECT `discord_id`, UNIX_TIMESTAMP(`timestamp`) as utime, `active` FROM `steam2discord` WHERE `steam_id` LIKE ?1 GROUP BY `discord_id`")
.setParameter(1, steamID.steam2)
.getResultList();
.getResultStream().map(d -> Map.of("discord_id", ((Object[]) d)[0], "utime", ((Object[]) d)[1], "active", ((Object[]) d)[2])).toList();
}
//SELECT CONCAT(SUBSTRING_INDEX(connect_ip,'.', 1),'.',SUBSTRING_INDEX(SUBSTRING_INDEX(connect_ip,'.', 2),'.',-1),'.',SUBSTRING_INDEX(SUBSTRING_INDEX(connect_ip,'.', 3),'.',-1),'.','%') FROM `all_users_con_2` WHERE `steam_id` LIKE 'STEAM_0:1:768781968';
}

Loading…
Cancel
Save