Skip to content

Commit

Permalink
Merge pull request #273 from Modagbul/main
Browse files Browse the repository at this point in the history
  • Loading branch information
seungueonn authored Mar 31, 2024
2 parents 1407b7b + f707f7e commit 20c8e77
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,19 @@ public class TeamScoreGetUseCase {
public TeamScoreRes getTeamScoreInfo(Long teamId) {

TeamScore teamScore = teamScoreQueryService.findTeamScoreByTeam(teamId);
Long level = teamScore.getLevel();
Long score = teamScore.getScore();

// 70 레벨 이상은 경험치 120 되어야 레벨업 가능. level을 각 레벨 별 필요한 경험치 수에 따르 퍼센트로 계산
if (level > 70) {
score = ( score / 120 ) * 100;
}

return TeamScoreRes.builder()
.score(teamScore.getScore())
.level(teamScore.getLevel())
.build()
;
.score(score)
.level(level)
.build();

}

}

0 comments on commit 20c8e77

Please sign in to comment.