|
|
@@ -749,14 +749,14 @@ public class GameScoreServiceImpl implements IGameScoreService {
|
|
|
currentRank = i + 1;
|
|
|
}
|
|
|
|
|
|
- int points = (currentRank <= pointConfig.size()) ? pointConfig.get(currentRank - 1) : 0;
|
|
|
- int finalRank = currentRank;
|
|
|
-
|
|
|
- // 成绩为0的处理:积分和名次均设为0
|
|
|
+ Integer points = (currentRank <= pointConfig.size()) ? pointConfig.get(currentRank - 1) : 0;
|
|
|
+ Integer finalRank = currentRank;
|
|
|
+
|
|
|
+ // 成绩为0的处理:积分和名次均设为空
|
|
|
BigDecimal perf = current.getIndividualPerformance();
|
|
|
if (perf == null || perf.compareTo(BigDecimal.ZERO) <= 0) {
|
|
|
- points = 0;
|
|
|
- finalRank = 0;
|
|
|
+ points = null;
|
|
|
+ finalRank = null;
|
|
|
}
|
|
|
|
|
|
updateList.add(buildUpdateScore(current.getScoreId(), finalRank, points));
|
|
|
@@ -790,15 +790,15 @@ public class GameScoreServiceImpl implements IGameScoreService {
|
|
|
}
|
|
|
|
|
|
// 团体积分通常有加成(此处可根据需求调整,默认取配置)
|
|
|
- int points = (currentRank <= pointConfig.size()) ? pointConfig.get(currentRank - 1) : 0;
|
|
|
- int finalRank = currentRank;
|
|
|
+ Integer points = (currentRank <= pointConfig.size()) ? pointConfig.get(currentRank - 1) : 0;
|
|
|
+ Integer finalRank = currentRank;
|
|
|
|
|
|
// 成绩为0的处理
|
|
|
GameScoreVo representative = teamGroups.get(teamId).get(0);
|
|
|
BigDecimal teamPerf = representative.getTeamPerformance();
|
|
|
if (teamPerf == null || teamPerf.compareTo(BigDecimal.ZERO) <= 0) {
|
|
|
- points = 0;
|
|
|
- finalRank = 0;
|
|
|
+ points = null;
|
|
|
+ finalRank = null;
|
|
|
}
|
|
|
|
|
|
// 将该队的名次和积分应用给该项目下该队的所有人
|
|
|
@@ -816,7 +816,7 @@ public class GameScoreServiceImpl implements IGameScoreService {
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
- private GameScore buildUpdateScore(Long scoreId, int rank, int points) {
|
|
|
+ private GameScore buildUpdateScore(Long scoreId, Integer rank, Integer points) {
|
|
|
GameScore update = new GameScore();
|
|
|
update.setScoreId(scoreId);
|
|
|
update.setScoreRank(rank);
|