-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
YEL-193 [feat] 친구 쪽지 전체 조회하기 #421
Merged
Merged
Changes from 3 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
3ab68da
YEL-193 [feat] 친구 투표 전체, 내가 보낸 쪽지 조회
hyeonjeongs 78f3e8d
YEL-193 [feat] adoc 수정
hyeonjeongs 717b91c
YEL-193 [feat] type 유형 수정
hyeonjeongs 1985350
YEL-193 [feat] 코드리뷰 반영
hyeonjeongs ee78833
YEL-193 [feat] 명세서 반영
hyeonjeongs 829b4f7
YEL-193 [feat] notice 날짜 변경되는거 수정
hyeonjeongs ce06a65
YEL-193 [feat] 명세서 수정
hyeonjeongs 5503e57
Merge branch 'develop' into feat/YEL-193
hyeonjeongs 3217c6c
YEL-193 [feat] notice testcode
hyeonjeongs c592b43
YEL-193 [feat] merge
hyeonjeongs bc6b303
YEL-193 [feat] vote type fix
hyeonjeongs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
20 changes: 20 additions & 0 deletions
20
src/main/java/com/yello/server/domain/vote/dto/response/VoteFriendAndUserResponse.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,20 @@ | ||
package com.yello.server.domain.vote.dto.response; | ||
|
||
import java.util.List; | ||
import lombok.Builder; | ||
|
||
@Builder | ||
public record VoteFriendAndUserResponse( | ||
Long totalCount, | ||
List<VoteFriendAndUserVO> friendVotes | ||
|
||
) { | ||
|
||
public static VoteFriendAndUserResponse of(Long totalCount, List<VoteFriendAndUserVO> friendVotes) { | ||
return VoteFriendAndUserResponse.builder() | ||
.totalCount(totalCount) | ||
.friendVotes(friendVotes) | ||
.build(); | ||
} | ||
} | ||
|
46 changes: 46 additions & 0 deletions
46
src/main/java/com/yello/server/domain/vote/dto/response/VoteFriendAndUserVO.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,46 @@ | ||
package com.yello.server.domain.vote.dto.response; | ||
|
||
import static com.yello.server.global.common.factory.TimeFactory.toFormattedString; | ||
|
||
import com.yello.server.domain.vote.entity.Vote; | ||
import lombok.Builder; | ||
|
||
@Builder | ||
public record VoteFriendAndUserVO( | ||
Long id, | ||
Long senderId, | ||
String senderName, | ||
String senderGender, | ||
String senderYelloId, | ||
String senderProfileImage, | ||
Long receiverId, | ||
String receiverName, | ||
String receiverGender, | ||
String receiverYelloId, | ||
String receiverProfileImage, | ||
VoteContentVO vote, | ||
Boolean isHintUsed, | ||
String createdAt, | ||
Boolean isUserSenderVote | ||
) { | ||
|
||
public static VoteFriendAndUserVO of(Vote vote, Boolean isUserSenderVote) { | ||
return VoteFriendAndUserVO.builder() | ||
.id(vote.getId()) | ||
.senderId(vote.getSender().getId()) | ||
.senderName(vote.getSender().getName()) | ||
.senderGender(vote.getSender().getGender().name()) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 차후 ENUM 점검할 때 getInitial()로 변경할 수 있도록 합시다 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 좋습니다 |
||
.senderYelloId(vote.getSender().getYelloId()) | ||
.senderProfileImage(vote.getSender().getProfileImage()) | ||
.receiverId(vote.getReceiver().getId()) | ||
.receiverGender(vote.getReceiver().getGender().name()) | ||
.receiverName(vote.getReceiver().getName()) | ||
.receiverYelloId(vote.getReceiver().getYelloId()) | ||
.receiverProfileImage(vote.getReceiver().getProfileImage()) | ||
.vote(VoteContentVO.of(vote)) | ||
.isHintUsed(vote.getIsAnswerRevealed()) | ||
.createdAt(toFormattedString(vote.getCreatedAt())) | ||
.isUserSenderVote(isUserSenderVote) | ||
.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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아래와 같이 type을 Nullable하게 만들고,
https://github.com/team-yello/YELLO-Server/blob/feat/YEL-187/src/main/java/com/yello/server/domain/admin/controller/AdminController.java#L156
을 참조해서 ENUM 처리를 해주세요