-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: myReview에서 상품명, 수정날짜 받게 설정
- Loading branch information
1 parent
0de2247
commit 0d9ea91
Showing
5 changed files
with
13 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
src/main/java/jeje/work/aeatbe/mapper/Review/ReviewResponseMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
package jeje.work.aeatbe.mapper.Review; | ||
|
||
import jeje.work.aeatbe.dto.product.ProductDTO; | ||
import jeje.work.aeatbe.dto.review.ReviewDTO; | ||
import jeje.work.aeatbe.dto.review.ReviewResponseDTO; | ||
import jeje.work.aeatbe.dto.user.UserInfoResponseDTO; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
public class ReviewResponseMapper { | ||
public ReviewResponseDTO toDTO(ReviewDTO reviewDTO, UserInfoResponseDTO userInfoResponseDTO) { | ||
public ReviewResponseDTO toDTO(ReviewDTO reviewDTO, UserInfoResponseDTO userInfoResponseDTO, ProductDTO productDto) { | ||
return ReviewResponseDTO.builder() | ||
.id(reviewDTO.id()) | ||
.rate(reviewDTO.rate()) | ||
.content(reviewDTO.content()) | ||
.user(userInfoResponseDTO) | ||
.productId(reviewDTO.productId()) | ||
.productImgUrl(reviewDTO.productImgUrl()) | ||
.productImgUrl(productDto.productImageUrl()) | ||
.date(reviewDTO.date()) | ||
.build(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters