Skip to content

Commit

Permalink
Merge pull request #185 from BETTER-iTER/feature/184
Browse files Browse the repository at this point in the history
[feature/184] review 상세 조회 api 반환값 수정
  • Loading branch information
luke0408 authored Feb 28, 2024
2 parents d3aa2a8 + 615179d commit fb5c20e
Showing 1 changed file with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.example.betteriter.fo_domain.review.dto;

import com.example.betteriter.fo_domain.review.domain.Review;
import com.example.betteriter.global.constant.Category;

import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
Expand All @@ -15,6 +17,7 @@ public class GetReviewDetailResponseDto {
private Long reviewId; // 리뷰 아이디
private String productName; // 리뷰 상품명
private List<String> reviewSpecData; // 리뷰 스펙 데이터
private Category category; // 리뷰 카테고리
private double starPoint; // 리뷰 별점
private String goodPoint; // 리뷰 좋은점
private String badPoint; // 리뷰 안좋은점
Expand All @@ -37,16 +40,18 @@ public class GetReviewDetailResponseDto {


@Builder
public GetReviewDetailResponseDto(Long reviewId, String productName, List<String> reviewSpecData, double starPoint,
String goodPoint, String badPoint, String shortReview, String manufacturer,
int storeName, String comparedProductName, LocalDate boughtAt, LocalDate createdAt,
List<GetReviewImageResponseDto> reviewImages, int price, long shownCount,
long scrapedCount, long likedCount, long commentCount, boolean isScrap,
boolean isLike, boolean isFollow, boolean isMine
public GetReviewDetailResponseDto(
Long reviewId, String productName, List<String> reviewSpecData, Category category,
double starPoint, String goodPoint, String badPoint, String shortReview,
String manufacturer, int storeName, String comparedProductName, LocalDate boughtAt,
LocalDate createdAt, List<GetReviewImageResponseDto> reviewImages, int price,
long shownCount, long scrapedCount, long likedCount, long commentCount,
boolean isScrap, boolean isLike, boolean isFollow, boolean isMine
) {
this.reviewId = reviewId;
this.productName = productName;
this.reviewSpecData = reviewSpecData;
this.category = category;
this.starPoint = starPoint;
this.goodPoint = goodPoint;
this.badPoint = badPoint;
Expand All @@ -73,6 +78,7 @@ public static GetReviewDetailResponseDto from(Review review, boolean isLike, boo
.reviewId(review.getId())
.productName(review.getProductName())
.reviewSpecData(getReviewSpecDataToStr(review))
.category(review.getCategory())
.starPoint(review.getStarPoint())
.goodPoint(review.getGoodPoint())
.badPoint(review.getBadPoint())
Expand Down

0 comments on commit fb5c20e

Please sign in to comment.