Skip to content

Commit

Permalink
Merge pull request #215 from Make-A-Wish-Sopt/feature/jiyoung-#214-de…
Browse files Browse the repository at this point in the history
…velop

[FIX] 소원 조회 시 닉네임 추가
  • Loading branch information
wlwpfh authored Nov 28, 2024
2 parents e8e63ab + 53d38f4 commit e89e1b7
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions src/main/java/com/sopterm/makeawish/dto/wish/WishResponseDTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,11 @@
import static com.sopterm.makeawish.common.message.ErrorMessage.EXPIRE_WISH;

@Builder
public record WishResponseDTO(long dayCount, String title, String hint, boolean wantsGift, String presentImageUrl, TransferInfo transferInfo) {
public record WishResponseDTO(long dayCount, String title, String hint, boolean wantsGift, String presentImageUrl, TransferInfo transferInfo, String nickname) {

public static WishResponseDTO from(Wish wish) {
// UserTransferInfo userTransferInfo = wish.getWisher().getUserTransferInfo();
// val name = nonNull(userTransferInfo.getAccountInfo().getName())
// ? userTransferInfo.getAccountInfo().getName()
// : wish.getWisher().getNickname();
//
// val account = nonNull(wish.getWisher().getUserTransferInfo().getAccountInfo().getAccount())
// ? userTransferInfo.getAccountInfo().getAccount()
// : StringUtils.EMPTY;
// val bank = nonNull(wish.getWisher().getUserTransferInfo().)
// ? userTransferInfo.getAccount().getBank()
// : StringUtils.EMPTY;
//
// val kakaoPayCode = nonNull(wish.getWisher().getAccount().getKakaoPayCode())
// ? userTransferInfo.getKakaoPayCode()
// : StringUtils.EMPTY;

return WishResponseDTO.builder()
.nickname(wish.getWisher().getNickname())
.transferInfo(wish.getWisher().getTransferInfo())
.dayCount(getRemainDayCount(wish.getEndAt()))
.title(wish.getTitle())
Expand Down

0 comments on commit e89e1b7

Please sign in to comment.