From 5df674b45a18ebb27878f1fe0c9b623a17f5629c Mon Sep 17 00:00:00 2001 From: Ghost_chu Date: Tue, 31 Dec 2024 05:34:02 +0800 Subject: [PATCH] fix sql --- .../com/ghostchu/btn/sparkle/module/analyse/AnalyseService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/ghostchu/btn/sparkle/module/analyse/AnalyseService.java b/src/main/java/com/ghostchu/btn/sparkle/module/analyse/AnalyseService.java index 9975708..cd1cb13 100644 --- a/src/main/java/com/ghostchu/btn/sparkle/module/analyse/AnalyseService.java +++ b/src/main/java/com/ghostchu/btn/sparkle/module/analyse/AnalyseService.java @@ -133,7 +133,7 @@ SELECT time_bucket('7 day', "insert_time") AS bucket, peer_ip, COUNT(DISTINCT us query.setParameter(3, untrustedIpAddressGenerateThreshold); List queryResult = query.getResultList(); for (Object[] arr : queryResult) { - var ipAddr = IPUtil.toIPAddress(((InetAddress) arr[0]).getHostAddress()); + var ipAddr = IPUtil.toIPAddress(((InetAddress) arr[1]).getHostAddress()); ipTries.add(ipAddr); } // banHistoryRepository