Skip to content

Commit

Permalink
refactor: 메서드 명 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
hyxklee committed Nov 22, 2024
1 parent 1feab24 commit e600e46
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ public interface FileMapper {

@Mapping(target = "id", ignore = true)
@Mapping(target = "post", source = "post")
File toFile(String fileName, String fileUrl, Post post);
File toFileWithPost(String fileName, String fileUrl, Post post);

@Mapping(target = "id", ignore = true)
@Mapping(target = "notice", source = "notice")
File toFile(String fileName, String fileUrl, Notice notice);
File toFileWithNotice(String fileName, String fileUrl, Notice notice);

@Mapping(target = "id", ignore = true)
@Mapping(target = "receipt", source = "receipt")
File toFile(String fileName, String fileUrl, Receipt receipt);
File toFileWithReceipt(String fileName, String fileUrl, Receipt receipt);

@Mapping(target = "fileId", source = "file.id")
FileResponse toFileResponse(File file);
Expand All @@ -44,7 +44,7 @@ default List<File> toFileList(List<FileSaveRequest> requests, Post post) {
}

return dto.stream()
.map(request -> toFile(request.fileName(), request.fileUrl(), post))
.map(request -> toFileWithPost(request.fileName(), request.fileUrl(), post))
.collect(Collectors.toList());
}

Expand All @@ -54,7 +54,7 @@ default List<File> toFileList(List<FileSaveRequest> requests, Notice notice) {
}

return requests.stream()
.map(request -> toFile(request.fileName(), request.fileUrl(), notice))
.map(request -> toFileWithNotice(request.fileName(), request.fileUrl(), notice))
.collect(Collectors.toList());
}

Expand All @@ -64,7 +64,7 @@ default List<File> toFileList(List<FileSaveRequest> requests, Receipt receipt) {
}

return requests.stream()
.map(request -> toFile(request.fileName(), request.fileUrl(), receipt))
.map(request -> toFileWithReceipt(request.fileName(), request.fileUrl(), receipt))
.collect(Collectors.toList());
}
}

0 comments on commit e600e46

Please sign in to comment.