赛事排名微调

This commit is contained in:
lishuo committed 2021-09-17 22:20:05 +08:00
1 parent 211967dda2
commit 125e9a48c6
7 files changed
+175 -26

No files matched your search

@@ -94,8 +94,8 @@ namespace Assets.Scenes.Ride.Scripts.Model.CyclingModels
{
try
{
if (recorderData.Saved)
return;
//if (recorderData.Saved)
// return;
if (recorderData.RiderDatas.Any())
{
var lastData = recorderData.RiderDatas.Last();
@@ -143,25 +143,26 @@ namespace Assets.Scenes.Ride.Scripts.Model.CyclingModels
WeightKg = item.WeightKg,
});
}
index++;
double near = Math.Round(item.EndDistance - currentDistance,2); //Math.Round(TurfHelper.GetDistances(point, item.Point), 2);
sort.Add(new CompetitionRankingSortModel
{
Index = index,
Name = item.Name,
Near = near,
KGWeight = Math.Round(item.WeightKg, 2).ToString(),
Speed = Math.Round(item.Speed, 1),
CountryImg = item.Country,//ConfigHelper.Host + $"User/GetCountryImg?userid={ item.Id }",
UserId = item.Id,
IsSelf = item.IsSelf,
Headimage = item.HeadImage,
CreateTime = DateTime.MaxValue,
EndDistance = item.EndDistance,
IsCompleted = item.IsCompleted
});
index++;
double near = Math.Round(item.EndDistance - currentDistance, 2); //Math.Round(TurfHelper.GetDistances(point, item.Point), 2);
sort.Add(new CompetitionRankingSortModel
{
Index = index,
Name = item.Name,
Near = near,
KGWeight = Math.Round(item.WeightKg, 2).ToString(),
Speed = Math.Round(item.Speed, 1),
CountryImg = item.Country,//ConfigHelper.Host + $"User/GetCountryImg?userid={ item.Id }",
UserId = item.Id,
IsSelf = item.IsSelf,
Headimage = item.HeadImage,
CreateTime = DateTime.MaxValue,
EndDistance = item.EndDistance,
IsCompleted = item.IsCompleted
});
}
}
}
@@ -179,6 +180,7 @@ namespace Assets.Scenes.Ride.Scripts.Model.CyclingModels
mapWorkoutRecordRankings = rrr.data;
}
}
foreach (var ranking in mapWorkoutRecordRankings)
{
//var ranking = mapWorkoutRecordRankings.SingleOrDefault(r => r.UserId == item.Id);