Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ public static NutritionReport toNutritionReport(Long reporterId, String nickname
.build();
}

public static ImageReport toImageReport(Long reporterId, Product product, String imageUrl){
public static ImageReport toImageReport(Long reporterId, String nickname, Product product, String imageUrl){
return ImageReport.builder()
.product(product)
.reporterId(reporterId)
.nickname(nickname)
.reportStatus(ReportStatus.IN_PROGRESS)
.imageUrl(imageUrl)
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public ReportResponseDto requestCheckImage(User user, Long productId, String ima

Product productProxy = productRepository.getReferenceById(productId); //SELECT 쿼리 없이 ID만 가진 프록시 객체를 가져옴

imageReportRepository.save(ReportConverter.toImageReport(user.getId(), productProxy, imageUrl));
imageReportRepository.save(ReportConverter.toImageReport(user.getId(), user.getNickname(), productProxy, imageUrl));

return ReportConverter.toReportResponseDto(productId,"상품 사진 확인 요청 완료");
}
Expand Down
Loading