Commit 6048b47e authored by xianyang's avatar xianyang

优化账户查询

parent ab3d5666
......@@ -281,6 +281,8 @@ class AccountStatistics(object):
if self.unique in ["user_account", "guild_account", "knapsack_account"]:
u_sql = f"select uuid,type,reference_type,SUM(cast(amount as decimal(20,6)))/1000 as amount,create_time,amount_type from {date} WHERE {' and '.join(condition)} GROUP BY uuid,type,reference_type,amount_type ORDER BY create_time DESC"
else:
if self.uuid:
condition.append(f" uuid='{self.uuid}'")
if condition:
u_sql = f"select id,uuid,order_number,type,reference_type,amount/1000 as amount,create_time from {date} WHERE {' and '.join(condition)} ORDER BY create_time DESC"
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment