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())))); } }