mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-23 19:30:06 +02:00
AccountInfo history statistics query
This commit is contained in:
1 parent
ec8f434f42
commit
758aa10e55
18 files changed
+522
-28
No files matched your search
@@ -111,14 +111,24 @@ namespace WotBlitzStatisticsPro.DataAccess
|
||||
.InsertOneAsync(tankInfoHistory);
|
||||
}
|
||||
|
||||
public Task<IEnumerable<AccountInfoHistory>> GetAccountHistory(long accountId, int lastBattleSince)
|
||||
public async Task<IEnumerable<AccountInfoHistory>> GetAccountHistory(long accountId, int lastBattleSince)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
var history = await _database.GetCollection<AccountInfoHistory>(AccountInfoHistoryCollectionName)
|
||||
.FindAsync(Builders<AccountInfoHistory>.Filter.Where(a =>
|
||||
a.AccountInfoHistoryId.AccountId == accountId && a.AccountInfoHistoryId.LastBattleTime >= lastBattleSince),
|
||||
new FindOptions<AccountInfoHistory> { Sort = Builders<AccountInfoHistory>.Sort.Descending(h => h.AccountInfoHistoryId.LastBattleTime)});
|
||||
return history.ToList();
|
||||
}
|
||||
|
||||
public Task<IEnumerable<TankInfoHistory>> GetTankHistory(long accountId, long tankId, int lastBattleSince)
|
||||
public async Task<IEnumerable<TankInfoHistory>> GetTankHistory(long accountId, long tankId, int lastBattleSince)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
var history = await _database.GetCollection<TankInfoHistory>(TankInfoHistoryCollectionName)
|
||||
.FindAsync(
|
||||
Builders<TankInfoHistory>.Filter.Where(t =>
|
||||
t.TankInfoHistoryId.AccountId == accountId && t.TankId == tankId && t.TankInfoHistoryId.LastBattleTime >= lastBattleSince),
|
||||
new FindOptions<TankInfoHistory>
|
||||
{Sort = Builders<TankInfoHistory>.Sort.Descending(h => h.TankInfoHistoryId.LastBattleTime)});
|
||||
return history.ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user