-
Notifications
You must be signed in to change notification settings - Fork 2
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
경기 조회 API #151
경기 조회 API #151
Conversation
betting.get().getBetPoint(), | ||
matchResult.getTeamAScore(), | ||
matchResult.getTeamBScore(), | ||
betting.get().getBetScoreA(), | ||
betting.get().getBetScoreB(), | ||
match.getTeamABet(), | ||
match.getTeamBBet() |
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.
배팅을 하지 않았다면 해당 값이 null로 나와서 NPE이 발생해요!
match.getTeamABet(), | ||
match.getTeamBBet(), | ||
matchResult.getTeamAScore(), | ||
matchResult.getTeamAScore(), |
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.
matchResult.getTeamAScore(), | |
matchResult.getTeamBScore(), |
B팀 점수인데 A팀 점수가 들어가네요!
return new MatchResultDto( | ||
match.getMatchId(), | ||
match.getMatchType(), | ||
match.getMatchLevel(), | ||
match.getTeamA().getTeamId(), | ||
match.getTeamA().getTeamName(), | ||
match.getTeamAGrade(), | ||
match.getTeamAClassType(), | ||
match.getTeamB().getTeamId(), | ||
match.getTeamB().getTeamName(), | ||
match.getTeamBGrade(), | ||
match.getTeamBClassType(), | ||
betting.isPresent(), | ||
match.getTeamABet(), | ||
match.getTeamBBet(), | ||
matchResult.getTeamAScore(), | ||
matchResult.getTeamAScore(), | ||
betting.get().getBetScoreA(), | ||
betting.get().getBetScoreB(), | ||
calculatePoint.getEarnedPoint(), | ||
calculatePoint.getLosePoint() |
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.
이렇게 생성자에 많은 필드를 주입하는것 보다 buidler 패턴을 사용하는것이 좋을것 같아요!
UserEntity currentUser = userFacade.getCurrentUser(); | ||
List<MatchEntity> matches = matchQueryDslRepository.findByMonthAndDay(month, day); | ||
List<MatchResultEntity> matchResults = matchResultQueryDslRepository.findByMonthAndDay(month, day); |
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.
경시 시작 시간, 끝나는 시간 값을 이용하여
matches: 경기 시작 전 or 경기 중인 경기
matchResults: 경기 시간이 끝난 경기
이렇게 조회되도록 변경 부탁드려요! 현재 상황은 경기 시간이 끝난 경기가 하나 있는데 matchs와 matchResults 모두 하나씩 나옵니다!
시간을 계산하여 한 쪽에서만 나오도록 변경 부탁드려요!
{
"match_id": 1,
"match_type": "SOCCER",
"match_level": "TRYOUT",
"team_aid": 36,
"team_aname": "팀8",
"team_agrade": "ONE",
"team_aclass_type": "SW",
"team_bid": 37,
"team_bname": "팀9",
"team_bgrade": "TWO",
"team_bclass_type": "SW",
"team_abet": 50000,
"team_bbet": 80000,
"team_ascore": 2,
"team_bscore": 2,
"bet_team_ascore": 3,
"bet_team_bscore": 2,
"earned_point": 117000,
"lose_point": null,
"vote": true
} 실제 json 값인데 명세서와 다른 부분이 다수 존재합니다! 해당 부분 수정 부탁드리고 도저히 안될것 같은 부분이 있다면 따로 디스코드로 공유 후에 명세서를 변경하여 맞춰주세요! |
No description provided.