Skip to content

Commit

Permalink
fix: 오타 수정 (#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
OziinG committed Dec 5, 2024
1 parent a519d43 commit 4c802ff
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ public class ImageItemWriter implements ItemWriter<ImageEntity> {
@Override
public void write(Chunk<? extends ImageEntity> chunk) {
List<? extends ImageEntity> imageEntities = chunk.getItems();
List<Long> videoIds = imageEntities.stream().map(ImageEntity::getId).toList();
List<Long> 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();
}
}

0 comments on commit 4c802ff

Please sign in to comment.