-
Notifications
You must be signed in to change notification settings - Fork 0
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
[feat] 선물 토너먼트 점수 입력 API & 토너먼트 정보 조회 API 구현 #50
Conversation
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.
리뷰 남겼습니다!! 고생했어용 😆
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.
토너먼트 점수 변경할 때 (결과 API) roommember 테이블에 있는 토너먼트 참여 여부도 변경해줘야 할 것 같아요! 기본값 false(DB에는 tinyint 라서 0, 1)로 되어 있는 걸 true로 반환해줘야 토너먼트 완료한 사람 수 보내줄 수 있을 거 같습니다!
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.
넹넹 확인!!
@@ -142,4 +147,28 @@ private List<TournamentListsResponseDto> mapGiftsToTournamentLists(List<Gift> gi | |||
.collect(Collectors.toList()); | |||
} | |||
|
|||
public void evaluateTournamentScore(TournamentScoreRequestDto tournamentScoreRequestDto) { | |||
int firstPlaceScore = 10; |
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.
이런 상수 값은 private static final int FIRST_PLACE_SCORE = 10;
처럼 service단 맨 위에 고정으로 넣어주고 아래서는 FIRST_PLACE_SCORE
로 꺼내와서 사용해도 유지보수에 용이할 것 같습니다 ㅎㅎ
@@ -36,6 +39,8 @@ public class GiftService { | |||
private final RoomRepository roomRepository; | |||
private final RoomMemberRepository roomMemberRepository; | |||
private static final int MAX_GIFT_COUNT = 2; | |||
private static final int FirstPlaceScore = 10; |
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.
여기서는 final로 상수를 정의한 거니까 두 가지 변수 명만 규칙에 맞게 대문자로 바꿔주면 좋을 거 같아요!!!
FIRST_PLACE_SCORE 처럼 적어주면 좋을 거 같아요 ~~
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.
네~~~꼼꼼한 리뷰 감사합니당
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.
고생하셨습니다!!! 🥹❤️
Related Issue 🍫
Summary 🍪
Before i request PR review 🍰