-
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.
🐛 [Fix] GameStyleIdList가 null일 때 예외처리
- Loading branch information
Showing
5 changed files
with
133 additions
and
76 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
46 changes: 46 additions & 0 deletions
46
src/main/java/com/gamegoo/converter/MatchingConverter.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.gamegoo.converter; | ||
|
||
import com.gamegoo.dto.matching.MatchingRequest; | ||
import com.gamegoo.dto.matching.MatchingResponse; | ||
import com.gamegoo.domain.member.Member; | ||
import com.gamegoo.dto.matching.MemberPriority; | ||
import org.springframework.stereotype.Component; | ||
|
||
import java.util.List; | ||
|
||
@Component | ||
public class MatchingConverter { | ||
|
||
// 매칭 요청에 대한 응답 DTO 생성 | ||
public static MatchingResponse.PriorityMatchingResponseDTO toPriorityMatchingResponseDTO( | ||
Member member, | ||
MatchingRequest.InitializingMatchingRequestDTO request, | ||
List<MemberPriority> myPriorityList, | ||
List<MemberPriority> otherPriorityList, | ||
List<String> gameStyleList) { | ||
|
||
// 내 매칭 기록 DTO 생성 | ||
MatchingResponse.matchingRequestResponseDTO myMatchingInfo = MatchingResponse.matchingRequestResponseDTO.builder() | ||
.memberId(member.getId()) | ||
.gameName(member.getGameName()) | ||
.tag(member.getTag()) | ||
.tier(member.getTier()) | ||
.rank(member.getRank()) | ||
.mannerLevel(member.getMannerLevel()) | ||
.profileImg(member.getProfileImage()) | ||
.gameMode(request.getGameMode()) | ||
.mainPosition(request.getMainP()) | ||
.subPosition(request.getSubP()) | ||
.wantPosition(request.getWantP()) | ||
.mike(request.getMike()) | ||
.gameStyleList(gameStyleList) | ||
.build(); | ||
|
||
// 최종 DTO 반환 | ||
return MatchingResponse.PriorityMatchingResponseDTO.builder() | ||
.myPriorityList(myPriorityList) | ||
.otherPriorityList(otherPriorityList) | ||
.myMatchingInfo(myMatchingInfo) | ||
.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