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

refactor: 진행 중인 경기 matchid 기준으로 정렬 #572

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

soeunnPark
Copy link
Collaborator

@soeunnPark soeunnPark commented Dec 20, 2024

PR에 대한 설명 🔍

캐시가 있을 때 match id 기준으로 정렬하여 응답합니다.

변경된 사항 📝

response를 정렬했습니다.

Before

After

PR에서 중점적으로 확인되어야 하는 사항

@soeunnPark soeunnPark added hotfix🥵 급한일 now❗️ 빠른 리뷰가 필요합니다. labels Dec 20, 2024
@soeunnPark soeunnPark self-assigned this Dec 20, 2024
Copy link
Collaborator

@I-migi I-migi left a comment

Choose a reason for hiding this comment

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

캐시를 사용할 때 이런 것도 고려해야 하네요!! 😄

@@ -98,6 +99,7 @@ public MatchInfo.SetScoreDetails retrieveAllSetsScoreInMatch(Long leagueId, Long
public List<LeagueSetsScoreInProgressInfo> retrieveLeagueMatchSetsScoreInProgress(Long leagueId) {
List<LeagueSetsScoreInProgressInfo> inProgressSet = setRepository.getInProgressSet(leagueId);
if (!inProgressSet.isEmpty()) {
inProgressSet.sort(Comparator.comparing(LeagueSetsScoreInProgressInfo::matchId));
Copy link
Collaborator

Choose a reason for hiding this comment

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

캐시가 없을 때는 retrieveLeagueMatchInProgress 에서 Comparing.sort를 사용해서 정렬이 되었었는데
캐시가 있을 때는 따로 정렬 함수가 없어서 데이터가 일정하게 나오지 않았나봐요!!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

맞아요! 정렬하는 부분을 놓쳤습니다 🤣

@soeunnPark soeunnPark merged commit 81e96ed into develop Dec 20, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotfix🥵 급한일 now❗️ 빠른 리뷰가 필요합니다.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants