From c6f9e5db6116374729a83ebc734d863fdb78af71 Mon Sep 17 00:00:00 2001 From: WrBug Date: Sat, 14 Feb 2026 18:09:25 +0800 Subject: [PATCH] =?UTF-8?q?fix(cryptotail):=20=E5=B7=B2=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E7=9A=84=E8=A7=A6=E5=8F=91=E4=B8=8D=E5=86=8D=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=20getOrder=EF=BC=8C=E7=9B=B4=E6=8E=A5=E6=A0=87=E8=AE=B0=20noti?= =?UTF-8?q?fication=5Fsent=3Dtrue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 轮询时若 trigger.resolved 为 true,跳过 CLOB getOrder 请求 - 将 notification_sent 设为 true 并保存,避免已结算订单无限轮询 Co-authored-by: Cursor --- .../cryptotail/CryptoTailOrderNotificationPollingService.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend/src/main/kotlin/com/wrbug/polymarketbot/service/cryptotail/CryptoTailOrderNotificationPollingService.kt b/backend/src/main/kotlin/com/wrbug/polymarketbot/service/cryptotail/CryptoTailOrderNotificationPollingService.kt index 44e8594..f0dfece 100644 --- a/backend/src/main/kotlin/com/wrbug/polymarketbot/service/cryptotail/CryptoTailOrderNotificationPollingService.kt +++ b/backend/src/main/kotlin/com/wrbug/polymarketbot/service/cryptotail/CryptoTailOrderNotificationPollingService.kt @@ -75,6 +75,12 @@ class CryptoTailOrderNotificationPollingService( if (pending.isEmpty()) return for (trigger in pending) { try { + if (trigger.resolved) { + trigger.notificationSent = true + triggerRepository.save(trigger) + logger.debug("触发已结算,跳过请求并标记已通知: triggerId=${trigger.id}, orderId=${trigger.orderId}") + continue + } if (sendNotificationForTrigger(trigger)) { trigger.notificationSent = true triggerRepository.save(trigger)