Commit 419b8cda authored by xianyang's avatar xianyang

修改业务汇总显示字段,优化公会账户时间显示

parent 70403d22
......@@ -166,10 +166,10 @@ def get_finance_info(unique_tag, page, size, start_time, end_time, is_list=None)
finance_condition.append(f"create_time < {time_str_to_timestamp(end_time + ' 23:59:59')} ")
if unique_tag == 'guild_account':
if finance_condition:
count_sql = f"select calculation_time from v3_guild_account_statistics_copy where {' and '.join(finance_condition)} GROUP BY create_time"
count_sql = f"select create_time from v3_guild_account_statistics_copy where {' and '.join(finance_condition)} GROUP BY create_time"
data_sql = f"select id,initial_money as balance,income,outcome,create_time from v3_guild_account_statistics_copy where {' and '.join(finance_condition)} GROUP BY create_time order by create_time DESC limit {(int(page) - 1) * size},{size}"
else:
count_sql = f"select calculation_time from v3_guild_account_statistics_copy GROUP BY create_time"
count_sql = f"select create_time from v3_guild_account_statistics_copy GROUP BY create_time"
data_sql = f"select id,initial_money as balance,income,outcome,create_time from v3_guild_account_statistics_copy GROUP BY create_time order by create_time DESC limit {(int(page) - 1) * size},{size}"
elif unique_tag == 'user_account':
if finance_condition:
......
......@@ -124,7 +124,7 @@ class CalculationMonthlyDetails(object):
"""月度详情"""
@staticmethod
def data_query(db, date, reference_type, is_out, page, size):
sql = f"SELECT reference_type,order_number,type,cast(amount as decimal(20,6))/1000 as money,amount_type,create_time FROM {date} where reference_type='{reference_type}' and type={is_out} LIMIT {(page-1)*size},{size}"
sql = f"SELECT reference_type,reference_number,type,cast(amount as decimal(20,6))/1000 as money,amount_type,create_time FROM {date} where reference_type='{reference_type}' and type={is_out} LIMIT {(page-1)*size},{size}"
res_data = LinkMysql(db).query_mysql(sql)
return res_data
......
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