From e8ccd5f871313cd9e9f92868e515eb9c2a492a52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9E=A5=EB=8F=99=EA=B2=B8?= Date: Sat, 23 Nov 2024 19:52:54 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20BugFix/#119=20-=20deleteById=20-?= =?UTF-8?q?>=20deleteByEventId=20=EC=98=A4=ED=83=80=20=EC=88=98=EC=A0=95?= =?UTF-8?q?=20(#120)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/repository/redis/ScheduledEventJobRepository.java | 2 ++ .../controller/consumer/EventSchedulerConsumerV1Controller.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/daon/onjung/core/repository/redis/ScheduledEventJobRepository.java b/src/main/java/com/daon/onjung/core/repository/redis/ScheduledEventJobRepository.java index 285e3d3..31e4c57 100644 --- a/src/main/java/com/daon/onjung/core/repository/redis/ScheduledEventJobRepository.java +++ b/src/main/java/com/daon/onjung/core/repository/redis/ScheduledEventJobRepository.java @@ -10,4 +10,6 @@ @Repository public interface ScheduledEventJobRepository extends CrudRepository { @NotNull List findAll(); + + void deleteByEventId(Long eventId); } diff --git a/src/main/java/com/daon/onjung/event/application/controller/consumer/EventSchedulerConsumerV1Controller.java b/src/main/java/com/daon/onjung/event/application/controller/consumer/EventSchedulerConsumerV1Controller.java index be4d5ce..4efb7bf 100644 --- a/src/main/java/com/daon/onjung/event/application/controller/consumer/EventSchedulerConsumerV1Controller.java +++ b/src/main/java/com/daon/onjung/event/application/controller/consumer/EventSchedulerConsumerV1Controller.java @@ -21,7 +21,7 @@ public void execute(JobExecutionContext context) throws JobExecutionException { Long eventId = context.getJobDetail().getJobDataMap().getLong("eventId"); // eventId를 통해 ScheduledEventJob을 삭제 - scheduledEventJobRepository.deleteById(eventId.toString()); + scheduledEventJobRepository.deleteByEventId(eventId); log.info("ScheduledEventJob 삭제 완료. eventId: {}", eventId); processCompletedEventUseCase.execute(eventId);