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"
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 ORDER BY create_time DESC"
else:
else:
ifcondition:
ifcondition:
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"
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"
...
@@ -344,6 +346,19 @@ class AccountStatistics(object):
...
@@ -344,6 +346,19 @@ class AccountStatistics(object):