Skip to content

Commit

Permalink
fix the bug where ZZZ self query doesn't show correct name of purchas…
Browse files Browse the repository at this point in the history
…e gift
  • Loading branch information
Scighost committed Aug 25, 2024
1 parent 29ef207 commit 5b2813b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Starward/Pages/SelfQueryPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -563,9 +563,17 @@ private void LoadMonthQueryItems(int type, string month)
}
if (gameBiz.ToGame() is GameBiz.ZZZ)
{
ZZZQueryItemList = dapper.Query<ZZZQueryItem>("""
var list = ZZZQueryItemList = dapper.Query<ZZZQueryItem>("""
SELECT * FROM ZZZQueryItem WHERE Uid=@uid AND Type=@type AND DateTime LIKE @month ORDER BY DateTime DESC;
""", new { uid, type, month = month + "%" }).ToList();
if (type is (int)ZZZQueryType.PurchaseGift)
{
foreach (var item in list)
{
item.Reason = item.ItemName;
}
}
ZZZQueryItemList = list;
MonthAddNum = ZZZQueryItemList.Where(x => x.AddNum > 0).Sum(x => x.AddNum);
MonthSubNum = ZZZQueryItemList.Where(x => x.AddNum < 0).Sum(x => x.AddNum);
}
Expand Down

0 comments on commit 5b2813b

Please sign in to comment.