-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #165 from BETTER-iTER/feature/130
[Feature/130] 리뷰 수정 API 구현
- Loading branch information
Showing
14 changed files
with
435 additions
and
66 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
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
69 changes: 69 additions & 0 deletions
69
src/main/java/com/example/betteriter/fo_domain/review/dto/UpdateReviewRequestDto.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 |
---|---|---|
@@ -0,0 +1,69 @@ | ||
package com.example.betteriter.fo_domain.review.dto; | ||
|
||
import com.example.betteriter.global.constant.Category; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import javax.validation.constraints.Max; | ||
import java.time.LocalDate; | ||
import java.util.List; | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
public class UpdateReviewRequestDto { | ||
|
||
private Category category; // 카테고리 | ||
|
||
private String productName; // 상품명 | ||
|
||
private LocalDate boughtAt; // 구매 일자 | ||
|
||
private String manufacturer; // 제조사 이름 | ||
|
||
private Integer price; // 가격 | ||
|
||
private Integer storeName; // 구매처 | ||
|
||
private String shortReview; // 한줄평 | ||
|
||
@Max(5) | ||
private Double starPoint; // 별점 | ||
|
||
private String goodPoint; // 좋은 점 | ||
|
||
private String badPoint; // 나쁜 점 | ||
|
||
private List<Long> specData; // specData id 리스트 | ||
|
||
private List<Integer> imageIndex; // 바꾸고자 하는 이미지의 인덱스 | ||
|
||
@Builder | ||
public UpdateReviewRequestDto( | ||
Category category, | ||
String productName, | ||
LocalDate boughtAt, | ||
String manufacturer, | ||
Integer price, | ||
Integer storeName, | ||
String shortReview, | ||
Double starPoint, | ||
String goodPoint, | ||
String badPoint, | ||
List<Long> specData, | ||
List<Integer> imageIndex | ||
) { | ||
this.category = category; | ||
this.productName = productName; | ||
this.boughtAt = boughtAt; | ||
this.manufacturer = manufacturer; | ||
this.price = price; | ||
this.storeName = storeName; | ||
this.shortReview = shortReview; | ||
this.starPoint = starPoint; | ||
this.goodPoint = goodPoint; | ||
this.badPoint = badPoint; | ||
this.specData = specData; | ||
this.imageIndex = imageIndex; | ||
} | ||
} |
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
5 changes: 5 additions & 0 deletions
5
...ain/java/com/example/betteriter/fo_domain/review/repository/ReviewSpecDataRepository.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,7 +1,12 @@ | ||
package com.example.betteriter.fo_domain.review.repository; | ||
|
||
import com.example.betteriter.fo_domain.review.domain.Review; | ||
import com.example.betteriter.fo_domain.review.domain.ReviewSpecData; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
import java.util.List; | ||
|
||
public interface ReviewSpecDataRepository extends JpaRepository<ReviewSpecData, Long> { | ||
List<ReviewSpecData> findAllByReview(Review review); | ||
|
||
} |
Oops, something went wrong.