Commit 086e7495 authored by xianyang's avatar xianyang

详情增加可提现消费数据字段

parent e88a7710
......@@ -390,14 +390,14 @@ class AccountStatistics(object):
if self.user_list:
user_uuid = self.user_list[0]
condition.append(f" uuid='{user_uuid.get('uuid')}'")
u_sql = f"select uuid,type,SUM(cast(amount as decimal(20,6)))/1000 as amount,FROM_UNIXTIME(create_time,'%Y%c%d') as create_time from {date} WHERE {' and '.join(condition)} GROUP BY uuid,type,FROM_UNIXTIME(create_time,'%Y%c%d')"
u_sql = f"select uuid,type,amount_type,SUM(cast(amount as decimal(20,6)))/1000 as amount,FROM_UNIXTIME(create_time,'%Y%c%d') as create_time from {date} WHERE {' and '.join(condition)} GROUP BY uuid,type,FROM_UNIXTIME(create_time,'%Y%c%d')"
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,reference_number,create_time from {date} WHERE {' and '.join(condition)} ORDER BY create_time DESC"
u_sql = f"select id,uuid,order_number,amount_type,type,reference_type,amount/1000 as amount,reference_number,create_time from {date} WHERE {' and '.join(condition)} ORDER BY create_time DESC"
else:
u_sql = f"select id,uuid,order_number,type,reference_type,amount/1000 as amount,reference_number,create_time from {date} ORDER BY create_time DESC"
u_sql = f"select id,uuid,order_number,amount_type,type,reference_type,amount/1000 as amount,reference_number,create_time from {date} ORDER BY create_time DESC"
Logger().logger.info(f"查询sql:{u_sql}")
result = LinkMysql(env.DB_HISTORY).query_mysql(u_sql)
return result
......
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