From 4c802ffcdd9d2d97cc8f7071c24a0ae9a59afbe5 Mon Sep 17 00:00:00 2001 From: OziinG Date: Thu, 5 Dec 2024 10:53:20 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=98=A4=ED=83=80=20=EC=88=98=EC=A0=95?= =?UTF-8?q?=20(#246)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../batch/job/image/ImageItemWriter.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/ioteatime/meonghanyangserver/batch/job/image/ImageItemWriter.java b/src/main/java/org/ioteatime/meonghanyangserver/batch/job/image/ImageItemWriter.java index 4be54c58..eb123dae 100644 --- a/src/main/java/org/ioteatime/meonghanyangserver/batch/job/image/ImageItemWriter.java +++ b/src/main/java/org/ioteatime/meonghanyangserver/batch/job/image/ImageItemWriter.java @@ -19,12 +19,12 @@ public class ImageItemWriter implements ItemWriter { @Override public void write(Chunk chunk) { List imageEntities = chunk.getItems(); - List videoIds = imageEntities.stream().map(ImageEntity::getId).toList(); + List imageIds = imageEntities.stream().map(ImageEntity::getId).toList(); - if (videoIds.isEmpty()) return; + if (imageIds.isEmpty()) return; - em.createQuery("DELETE FROM ImageEntity WHERE id IN (:videoIds)") - .setParameter("videoIds", videoIds) + em.createQuery("DELETE FROM ImageEntity WHERE id IN (:imageIds)") + .setParameter("imageIds", imageIds) .executeUpdate(); } }