Commit f45ecd52 authored by xianyang's avatar xianyang

明细查询优化

parent dbb1b0aa
......@@ -523,6 +523,14 @@ class AccountStatistics(object):
guild_cond_list = []
start_time = time_str_to_timestamp(self.start_time + ' 00:00:00')
end_time = time_str_to_timestamp(self.end_time + ' 23:59:59')
if not self.amount_type:
guild_cond_list.append("amount_type=1")
else:
if self.amount_type == 'consumable':
amount_type_num = 2
else:
amount_type_num = 3
guild_cond_list.append(f"amount_type={amount_type_num}")
guild_cond_list.append(f" (income>0 or outcome>0 or initial_money>0) ")
guild_cond_list.append(f" create_time >={start_time} and create_time<= {end_time}")
if self.user_id:
......
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