Fix clear, fc and pfc counts
This commit is contained in:
parent
91a7a40bfc
commit
fd9d1a95ab
@ -37,10 +37,9 @@ public class PlayDataController : BaseController<PlayDataController>
|
|||||||
var songPlayLogs = playLogs.Where(datum => datum.SongId == songBestData.SongId &&
|
var songPlayLogs = playLogs.Where(datum => datum.SongId == songBestData.SongId &&
|
||||||
datum.Difficulty == songBestData.Difficulty).ToList();
|
datum.Difficulty == songBestData.Difficulty).ToList();
|
||||||
songBestData.PlayCount = songPlayLogs.Count;
|
songBestData.PlayCount = songPlayLogs.Count;
|
||||||
var groups = songPlayLogs.GroupBy(datum => datum.Crown).ToLookup(datums => datums.Key);
|
songBestData.ClearCount = songPlayLogs.Count(datum => datum.Crown >= CrownType.Clear);
|
||||||
songBestData.ClearCount = groups[CrownType.Clear].Count();
|
songBestData.FullComboCount = songPlayLogs.Count(datum => datum.Crown >= CrownType.Gold);
|
||||||
songBestData.FullComboCount = groups[CrownType.Gold].Count();
|
songBestData.PerfectCount = songPlayLogs.Count(datum => datum.Crown >= CrownType.Dondaful);
|
||||||
songBestData.PerfectCount = groups[CrownType.Dondaful].Count();
|
|
||||||
}
|
}
|
||||||
var favoriteSongs = await userDatumService.GetFavoriteSongIds(baid);
|
var favoriteSongs = await userDatumService.GetFavoriteSongIds(baid);
|
||||||
var favoriteSet = favoriteSongs.ToHashSet();
|
var favoriteSet = favoriteSongs.ToHashSet();
|
||||||
|
Loading…
Reference in New Issue
Block a user