From 549bbee654e1043bf09424809783c80f4dc9f305 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A3=BC=EC=88=98=ED=98=84?= Date: Fri, 27 Jun 2025 19:02:36 +0900 Subject: [PATCH] =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EC=97=85=EB=A1=9C?= =?UTF-8?q?=EB=93=9C=20=EC=88=98=EC=A0=95=EC=9E=90=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../adapters/persistence/UpdateFileDao.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/app/module/core/usecase/file/updateFile/adapters/persistence/UpdateFileDao.java b/core/src/main/java/app/module/core/usecase/file/updateFile/adapters/persistence/UpdateFileDao.java index f8786198..4465e0b4 100644 --- a/core/src/main/java/app/module/core/usecase/file/updateFile/adapters/persistence/UpdateFileDao.java +++ b/core/src/main/java/app/module/core/usecase/file/updateFile/adapters/persistence/UpdateFileDao.java @@ -4,6 +4,7 @@ import app.module.core.config.adapters.persistence.entity.UploadFile; import app.module.core.config.application.annotation.DeleteCommand; import app.module.core.config.application.annotation.UpdateCommand; import app.module.core.config.application.enums.FileUploadType; +import app.module.core.config.application.util.AuditUtil; import app.module.core.config.application.util.CommonUtil; import app.module.core.config.application.util.SftpFileDeleteUtil; import app.module.core.usecase.file.createFile.ports.CreateFilePortOut; @@ -34,11 +35,11 @@ class UpdateFileDao implements UpdateFilePortOut { @DeleteCommand public void operate(UpdateFileCmd command) { - List deletedFileList = mapper.findDeleteFileList(new UpdateUploadFileParam( + List deletedFileList = mapper.findDeleteFileList(AuditUtil.update(new UpdateUploadFileParam( command.getId(), command.getFileMappingIds(), command.getType().getName() - )); + ))); for (UploadFileDto file : deletedFileList) { try { @@ -54,13 +55,13 @@ class UpdateFileDao implements UpdateFilePortOut { if (!deletedFileList.isEmpty()) { mapper.deleteFile( - new UpdateUploadFileParam( + AuditUtil.delete(new UpdateUploadFileParam( command.getId(), deletedFileList.stream().map(UploadFileDto::getId).toList(), - command.getType().getName())); + command.getType().getName()))); } - command.getFileMappingIds().forEach(fileId -> mapper.updateFile(new UploadFileDto(fileId, command.getId(),command.getType().getName()))); + command.getFileMappingIds().forEach(fileId -> mapper.updateFile(AuditUtil.update(new UploadFileDto(fileId, command.getId(),command.getType().getName())))); } }