Skip to content
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

Merged
merged 15 commits into from
Jan 12, 2024

Conversation

hysong4u
Copy link
Member

@hysong4u hysong4u commented Jan 12, 2024

Related Issue 🍫

Summary 🍪

  • 선물 토너먼트 점수 입력 API
스크린샷 2024-01-12 오후 7 25 31 스크린샷 2024-01-12 오후 11 18 48

Before i request PR review 🍰

@hysong4u hysong4u added the FEAT 새로운 기능을 추가 label Jan 12, 2024
@hysong4u hysong4u self-assigned this Jan 12, 2024
Copy link
Contributor

@ziiyouth ziiyouth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

리뷰 남겼습니다!! 고생했어용 😆

Copy link
Contributor

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로 반환해줘야 토너먼트 완료한 사람 수 보내줄 수 있을 거 같습니다!

Copy link
Member Author

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;
Copy link
Contributor

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로 꺼내와서 사용해도 유지보수에 용이할 것 같습니다 ㅎㅎ

@hysong4u hysong4u changed the title [feat] 선물 토너먼트 점수 입력 API [feat] 선물 토너먼트 점수 입력 API & 토너먼트 정보 조회 API 구현 Jan 12, 2024
@@ -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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기서는 final로 상수를 정의한 거니까 두 가지 변수 명만 규칙에 맞게 대문자로 바꿔주면 좋을 거 같아요!!!
FIRST_PLACE_SCORE 처럼 적어주면 좋을 거 같아요 ~~

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네~~~꼼꼼한 리뷰 감사합니당

Copy link
Contributor

@ziiyouth ziiyouth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다!!! 🥹❤️

@hysong4u hysong4u merged commit e32ce29 into develop Jan 12, 2024
1 check passed
@hysong4u hysong4u deleted the feature/#48-gift branch February 5, 2024 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FEAT 새로운 기능을 추가
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feat] 선물 토너먼트 점수 입력 API
2 participants