Skip to content

Commit

Permalink
🚧 Misc
Browse files Browse the repository at this point in the history
  • Loading branch information
rmbadmin committed Nov 20, 2023
1 parent 198ec9d commit e777bfe
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,18 +139,22 @@ public async Task<IEnumerable<AppCardsAvgPrice>> GetAppCradsAvgPrice(uint[] appI
var avgs = new List<AppCardsAvgPrice>();
foreach (var item in document.RootElement.GetProperty("data").EnumerateObject())
{
var avg = new AppCardsAvgPrice();
try
{
var avg = new AppCardsAvgPrice();
avg.AppId = uint.Parse(item.Name);
avg.Regular = item.Value.GetProperty("regular").GetDecimal();
avg.Foil = item.Value.GetProperty("foil").GetDecimal();
avgs.Add(avg);
}
catch (Exception ex)
{
Log.Warn(nameof(GetAppCradsAvgPrice), ex, "获取卡片价格数据出错");
}
finally
{
if (avg.AppId > 0)
avgs.Add(avg);
}
}
return avgs;
}
Expand Down

0 comments on commit e777bfe

Please sign in to comment.