Skip to content

Commit

Permalink
[feature/#74] Add seller profile image to product details
Browse files Browse the repository at this point in the history
  • Loading branch information
hershyYJ committed Nov 26, 2024
1 parent ecd53db commit e3a7754
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ public class EndedProductDetailsDto {
@Schema(description = "경매 등록자 닉네임", example = "에코마켓")
private String sellerNickname;

@Schema(description = "경매 등록자 프로필 이미지 URL", example = "http://example.com/profile.jpg")
private String sellerProfileImage;

@Schema(description = "상품 사진 URL 목록")
private List<String> images;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ public class OngoingProductDetailsDto {
@Schema(description = "경매 등록자 닉네임", example = "에코마켓")
private String sellerNickname;

@Schema(description = "경매 등록자 프로필 이미지 URL", example = "http://example.com/profile.jpg")
private String sellerProfileImage;

@Schema(description = "경매 마감 시간", example = "")
private LocalDateTime endTime;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ public class UpcomingProductDetailsDto {
@Schema(description = "경매 등록자 닉네임", example = "에코마켓")
private String sellerNickname;

@Schema(description = "경매 등록자 프로필 이미지 URL", example = "http://example.com/profile.jpg")
private String sellerProfileImage;

@Schema(description = "상품 사진 URL 목록")
private List<String> images;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ public interface ProductMapper {
@Mapping(source = "product.productName", target = "productName")
@Mapping(source = "product.productDescription", target = "productDescription")
@Mapping(source = "seller.nickname", target = "sellerNickname")
@Mapping(source = "seller.kakaoProfileImage", target = "sellerProfileImage")
@Mapping(target = "images", expression = "java(filterRepresentativeImages(auction.getProduct().getImages()))")
UpcomingProductDetailsDto auctionToUpcomingAuctionProductDto(Auction auction);

@Mapping(source = "product.id", target = "productId")
@Mapping(source = "product.productName", target = "productName")
@Mapping(target = "productDescription", source = "product.productDescription")
@Mapping(source = "seller.nickname", target = "sellerNickname")
@Mapping(source = "seller.kakaoProfileImage", target = "sellerProfileImage")
@Mapping(source = "product.images", target = "images")
EndedProductDetailsDto toEndedProductDetailsDto(Auction auction);

Expand All @@ -41,6 +43,7 @@ public interface ProductMapper {
@Mapping(source = "auction.product.productName", target = "productName")
@Mapping(source = "auction.product.productDescription", target = "productDescription")
@Mapping(source = "sellerNickname", target = "sellerNickname")
@Mapping(source = "auction.seller.kakaoProfileImage", target = "sellerProfileImage")
@Mapping(source = "auction.endTime", target = "endTime")
@Mapping(source = "auction.numOfBidders", target = "numOfBidders")
@Mapping(source = "top3BidDatePrice", target = "top3BidDatePrice")
Expand Down

0 comments on commit e3a7754

Please sign in to comment.