From 5a2675a1d5be46df698ee11c21c0eb4886880f09 Mon Sep 17 00:00:00 2001 From: htlee Date: Thu, 19 Mar 2026 11:49:38 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20OSINT=20=EC=A4=91=EB=B3=B5=20=EC=B2=B4?= =?UTF-8?q?=ED=81=AC=EB=A5=BC=20title=20=EB=8B=A8=EB=8F=85=20=EC=A1=B0?= =?UTF-8?q?=EA=B1=B4=EC=9C=BC=EB=A1=9C=20=EB=8B=A8=EC=88=9C=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/gc/mda/kcg/collector/osint/OsintCollector.java | 6 ++---- .../java/gc/mda/kcg/domain/osint/OsintFeedRepository.java | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/backend/src/main/java/gc/mda/kcg/collector/osint/OsintCollector.java b/backend/src/main/java/gc/mda/kcg/collector/osint/OsintCollector.java index 91952a5..386c067 100644 --- a/backend/src/main/java/gc/mda/kcg/collector/osint/OsintCollector.java +++ b/backend/src/main/java/gc/mda/kcg/collector/osint/OsintCollector.java @@ -118,8 +118,7 @@ public class OsintCollector { if (articleUrl == null || title == null || title.isBlank()) continue; if (osintFeedRepository.existsBySourceAndSourceUrl("gdelt", articleUrl)) continue; - if (osintFeedRepository.existsByRegionAndTitleAndCollectedAtAfter( - region, title, Instant.now().minus(24, ChronoUnit.HOURS))) continue; + if (osintFeedRepository.existsByTitle(title)) continue; String seendate = article.path("seendate").asText(null); Instant publishedAt = parseGdeltDate(seendate); @@ -184,8 +183,7 @@ public class OsintCollector { if (link == null || title == null || title.isBlank()) continue; if (osintFeedRepository.existsBySourceAndSourceUrl(sourceName, link)) continue; - if (osintFeedRepository.existsByRegionAndTitleAndCollectedAtAfter( - region, title, Instant.now().minus(24, ChronoUnit.HOURS))) continue; + if (osintFeedRepository.existsByTitle(title)) continue; Instant publishedAt = parseRssDate(pubDate); diff --git a/backend/src/main/java/gc/mda/kcg/domain/osint/OsintFeedRepository.java b/backend/src/main/java/gc/mda/kcg/domain/osint/OsintFeedRepository.java index b87a231..d3355aa 100644 --- a/backend/src/main/java/gc/mda/kcg/domain/osint/OsintFeedRepository.java +++ b/backend/src/main/java/gc/mda/kcg/domain/osint/OsintFeedRepository.java @@ -9,7 +9,7 @@ public interface OsintFeedRepository extends JpaRepository { boolean existsBySourceAndSourceUrl(String source, String sourceUrl); - boolean existsByRegionAndTitleAndCollectedAtAfter(String region, String title, Instant since); + boolean existsByTitle(String title); List findByRegionAndCollectedAtAfterOrderByPublishedAtDesc(String region, Instant since); } -- 2.45.2