파일 업로드 수정자 추가
This commit is contained in:
@@ -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<UploadFileDto> deletedFileList = mapper.findDeleteFileList(new UpdateUploadFileParam(
|
||||
List<UploadFileDto> 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()))));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user