|
@@ -129,17 +129,17 @@ public class SysMusicCompareRecordServiceImpl extends BaseServiceImpl<Long, SysM
|
|
|
}
|
|
|
|
|
|
for (int i = 0; i < userTrainStat.size(); i++) {
|
|
|
- if(userTrainStat.get(i).getUserId().equals(queryInfo.getUserId())){
|
|
|
- head = userTrainStat.get(i);
|
|
|
- }
|
|
|
+ userTrainStat.get(i).setRankNum(i+1);
|
|
|
+ userTrainStat.get(i).setTrainTime(userTrainStat.get(i).getTrainTime()/60);
|
|
|
if(studentSubjectMap.containsKey(userTrainStat.get(i).getUserId())){
|
|
|
userTrainStat.get(i).setSubjectName(studentSubjectMap.get(userTrainStat.get(i).getUserId()));
|
|
|
}
|
|
|
if(detail.size()<10){
|
|
|
- userTrainStat.get(i).setRankNum(i+1);
|
|
|
- userTrainStat.get(i).setTrainTime(userTrainStat.get(i).getTrainTime()/60);
|
|
|
detail.add(userTrainStat.get(i));
|
|
|
}
|
|
|
+ if(userTrainStat.get(i).getUserId().equals(queryInfo.getUserId())){
|
|
|
+ head = userTrainStat.get(i);
|
|
|
+ }
|
|
|
}
|
|
|
result.setHead(head);
|
|
|
detail.sort(Comparator.comparing(MusicCompareRankingDto::getRankNum).thenComparing(MusicCompareRankingDto::getUserId));
|