Commit 249d4ca0 authored by liming's avatar liming

个人排名查询修改

parent 035431ed
......@@ -388,6 +388,8 @@ public class SportUserTrainingLogService {
if (rank == null) {
result = new SportUserMonthRankResponseDTO();
result.setRank(0);
result.setScoreRank(0);
result.setCalorieRank(0);
result.setTotalCalorie(0);
result.setOneMinutesFtp(BigDecimal.ZERO);
result.setFiveMinutesFtp(BigDecimal.ZERO);
......@@ -395,8 +397,13 @@ public class SportUserTrainingLogService {
result.setScore(BigDecimal.ZERO);
} else {
result = sportUserConverter.toSportUserMonthRankResponseDTO(rank);
result.setRank(sportUserMonthRankBusinessMapper.getMyRank(type, rank.getScore(), rank.getTotalCalorie(),
rank.getUpdateTime(), year, month));
Integer scoreRank = sportUserMonthRankBusinessMapper.getMyRank(1, rank.getScore(), rank.getTotalCalorie(),
rank.getUpdateTime(), year, month);
Integer calorieRank = sportUserMonthRankBusinessMapper.getMyRank(2, rank.getScore(), rank.getTotalCalorie(),
rank.getUpdateTime(), year, month);
result.setRank(scoreRank);
result.setScoreRank(scoreRank);
result.setCalorieRank(calorieRank);
}
SportUser user = sportUserMapper.selectById(userId);
......
......@@ -13,6 +13,10 @@ public class SportUserMonthRankResponseDTO {
private Long playerId;
@ApiModelProperty("排名")
private Integer rank;
@ApiModelProperty("积分排名")
private Integer scoreRank;
@ApiModelProperty("卡路里排名")
private Integer calorieRank;
@ApiModelProperty("昵称")
private String nickname;
@ApiModelProperty("头像")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment