u_sql=f"select uuid,type,SUM(cast(amount as decimal(20,6)))/1000 as amount,FROM_UNIXTIME(create_time, '%y%m%d') as create_time,amount_type from {date} WHERE {' and '.join(condition)} GROUP BY uuid,type ORDER BY FROM_UNIXTIME(create_time, '%y%m%d') DESC"
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"
...
@@ -293,10 +295,11 @@ class AccountStatistics(object):
...
@@ -293,10 +295,11 @@ class AccountStatistics(object):
sql=f"select uuid,type,cast(amount as decimal(20,6))/1000 as amount,reference_type,create_time,amount_type from {date} WHERE {' and '.join(cond_list)} ORDER BY create_time DESC"