Commit 1dd3771c authored by xianyang's avatar xianyang

优化充值报表列表

parent 88f5ebad
......@@ -112,7 +112,7 @@ class RechargeStatement(object):
if month_type == 1:
count_sql = f"SELECT count(*) FROM assets_log_{now_month} where {query}"
count = self.linkmysql.query_mysql(count_sql)[0].get("count(*)")
sql = f"SELECT id,a.uuid,a.amount,FROM_UNIXTIME(a.create_time,'%Y-%c-%d %h:%i:%s') as payment_time,a.reference_type,a.reference_number FROM assets_log_{now_month} as a where {query} ORDER BY id desc limit {(int(page) - 1) * size},{size}"
sql = f"SELECT id,a.uuid,a.amount,FROM_UNIXTIME(a.create_time,'%Y-%c-%d %h:%i:%s') as payment_time,a.reference_type,a.reference_number,a.amount_type FROM assets_log_{now_month} as a where {query} ORDER BY id desc limit {(int(page) - 1) * size},{size}"
once_res = self.linkmysql.query_mysql(sql)
money_sql = f"SELECT sum(amount) FROM assets_log_{now_month} where {query}"
moeny_data = self.linkmysql.query_mysql(money_sql)[0].get("sum(amount)") if \
......
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