-
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 #30 from KONKUK-MAP-Service/feat-spot
✔️ [Fix] : 장소, 댓글 도메인 클라이언트 반환값 수정 #30
- Loading branch information
Showing
12 changed files
with
152 additions
and
50 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
45 changes: 45 additions & 0 deletions
45
src/main/java/com/cona/KUsukKusuk/comment/dto/CommentListResponseDto.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,45 @@ | ||
package com.cona.KUsukKusuk.comment.dto; | ||
|
||
import com.cona.KUsukKusuk.comment.domain.Comment; | ||
import com.cona.KUsukKusuk.spot.domain.Spot; | ||
import com.cona.KUsukKusuk.user.dto.BoomarkLikeResponseDto; | ||
import com.cona.KUsukKusuk.user.dto.PageInfo; | ||
import java.time.LocalDateTime; | ||
import lombok.Builder; | ||
|
||
@Builder | ||
public record CommentListResponseDto( | ||
String spotName, | ||
Long spotId, | ||
String usersComment, | ||
String review, | ||
LocalDateTime CommentcreateDate, | ||
|
||
String author, | ||
|
||
|
||
String spotImageurl, | ||
long totalElements, | ||
int page, | ||
int size, | ||
int totalPages | ||
) { | ||
|
||
public static CommentListResponseDto of (Comment comment, PageInfo pageInfo){ | ||
return CommentListResponseDto.builder() | ||
.spotName(comment.getSpot().getSpotName()) | ||
.spotImageurl(comment.getSpot().getImageUrls().get(0)) | ||
.CommentcreateDate(comment.getCreatedDate()) | ||
.spotId(comment.getId()) | ||
.review(comment.getSpot().getReview()) | ||
.author(comment.getUser().getNickname()) | ||
.usersComment(comment.getComment()) | ||
.totalElements(pageInfo.getTotalElements()) | ||
.page(pageInfo.getPage()) | ||
.size(pageInfo.getSize()) | ||
.totalPages(pageInfo.getTotalPages()) | ||
.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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,9 @@ public record SpotUpdateRequest ( | |
|
||
|
||
|
||
String review | ||
String review, | ||
|
||
int deleteImageindex | ||
){ | ||
|
||
} |
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