-
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 #49 from PowerSupply-ES/feature-admin-member
멤버 detail 불러오기에 속성 추가
- Loading branch information
Showing
4 changed files
with
65 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.powersupply.PES.mapper; | ||
|
||
import com.powersupply.PES.domain.dto.MemberDTO; | ||
import com.powersupply.PES.domain.entity.AnswerEntity; | ||
import com.powersupply.PES.domain.entity.CommentEntity; | ||
|
||
public class MapperUtils { | ||
|
||
public static MemberDTO.MemberMySolveResponse toMemberMySolveResponse(AnswerEntity answerEntity) { | ||
return MemberDTO.MemberMySolveResponse.builder() | ||
.problemId(answerEntity.getProblemEntity().getProblemId()) | ||
.problemTitle(answerEntity.getProblemEntity().getProblemTitle()) | ||
.problemScore(answerEntity.getProblemEntity().getProblemScore()) | ||
.answerId(answerEntity.getAnswerId()) | ||
.answerState(answerEntity.getAnswerState()) | ||
.finalScore(answerEntity.getFinalScore()) | ||
.build(); | ||
} | ||
|
||
public static MemberDTO.MemberMyFeedbackResponse toMemberMyFeedbackResponse(CommentEntity commentEntity) { | ||
return MemberDTO.MemberMyFeedbackResponse.builder() | ||
.answerId(commentEntity.getAnswerEntity().getAnswerId()) | ||
.memberGen(commentEntity.getAnswerEntity().getMemberEntity().getMemberGen()) | ||
.memberName(commentEntity.getAnswerEntity().getMemberEntity().getMemberName()) | ||
.commentPassFail(commentEntity.getCommentPassFail()) | ||
.commentContent(commentEntity.getCommentContent()) | ||
.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