From 5f71c6525b780e76c3704235a3429d374321ab83 Mon Sep 17 00:00:00 2001 From: jihyo Date: Wed, 22 May 2024 02:14:35 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20Answer=20=EC=A7=88=EB=AC=B8=EC=9E=90?= =?UTF-8?q?=20=EC=8B=A4=EC=A0=9C=20=EB=8B=89=EB=84=A4=EC=9E=84=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../baebaeBE/domain/answer/dto/AnswerDetailResponse.java | 8 +++++--- .../baebaeBE/domain/answer/repository/AnswerMapper.java | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/baebae-BE/src/main/java/com/web/baebaeBE/domain/answer/dto/AnswerDetailResponse.java b/baebae-BE/src/main/java/com/web/baebaeBE/domain/answer/dto/AnswerDetailResponse.java index 209f8350..f83c5fb1 100644 --- a/baebae-BE/src/main/java/com/web/baebaeBE/domain/answer/dto/AnswerDetailResponse.java +++ b/baebae-BE/src/main/java/com/web/baebaeBE/domain/answer/dto/AnswerDetailResponse.java @@ -14,6 +14,7 @@ public class AnswerDetailResponse { private Long memberId; private String content; private String nickname; + private String senderNickname; private Boolean profileOnOff; private String linkAttachments; private String musicName; @@ -24,7 +25,7 @@ public class AnswerDetailResponse { public AnswerDetailResponse(Long answerId, Long questionId, String questionContent, Long memberId, - String content, String nickname, Boolean profileOnOff, + String content, String nickname, String senderNickname, Boolean profileOnOff, String linkAttachments, String musicName, String musicSinger, String musicAudioUrl, String imageUrl, LocalDateTime createdDate) { @@ -35,6 +36,7 @@ public AnswerDetailResponse(Long answerId, Long questionId, String questionConte this.memberId = memberId; this.content = content; this.nickname = nickname; + this.senderNickname = senderNickname; this.profileOnOff = profileOnOff; this.linkAttachments = linkAttachments; this.musicName = musicName; @@ -45,10 +47,10 @@ public AnswerDetailResponse(Long answerId, Long questionId, String questionConte } public static AnswerDetailResponse of(Long answerId, Long questionId, String questionContent, Long memberId, - String content, String nickname, Boolean profileOnOff, + String content, String nickname, String senderNickname, Boolean profileOnOff, String linkAttachments, String musicName, String musicSinger, String musicAudioUrl, String imageUrl, LocalDateTime createdDate) { - return new AnswerDetailResponse(answerId, questionId, questionContent, memberId, content, nickname, + return new AnswerDetailResponse(answerId, questionId, questionContent, memberId, content, nickname, senderNickname, profileOnOff, linkAttachments, musicName, musicSinger, musicAudioUrl, imageUrl, createdDate); diff --git a/baebae-BE/src/main/java/com/web/baebaeBE/domain/answer/repository/AnswerMapper.java b/baebae-BE/src/main/java/com/web/baebaeBE/domain/answer/repository/AnswerMapper.java index 6e1ce10d..cd65bd9f 100644 --- a/baebae-BE/src/main/java/com/web/baebaeBE/domain/answer/repository/AnswerMapper.java +++ b/baebae-BE/src/main/java/com/web/baebaeBE/domain/answer/repository/AnswerMapper.java @@ -57,6 +57,7 @@ public AnswerDetailResponse toDomain(Answer answer) { member.getId(), answer.getContent(), answer.getNickname(), + question.getSender().getNickname(), answer.isProfileOnOff(), answer.getLinkAttachments(), music != null ? music.getMusicName() : null,