Commit 153461ec authored by xianyang's avatar xianyang

优化业务类型汇总查询

parent 19946f78
......@@ -412,7 +412,11 @@ class AccountStatistics(object):
def special_handle(self, old_data, special_data):
"""处理可消费,可提现数据"""
bk = pd.DataFrame(special_data)
for old in old_data:
if not old.get('guild_id'):
Logger().logger.info("错误的公会数据:", old)
continue
df = bk[(bk["guild_id"] == old['guild_id']) & (bk["create_time"] == old['create_time']) & (bk["amount_type"] == 2)] # 可消费
serializer_info = df.to_dict(orient='records')
if serializer_info:
......@@ -553,7 +557,7 @@ 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')
guild_cond_list.append(f" (income>0 or outcome>0 or initial_money>0) ")
# 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:
guild_cond_list.append(f" guild_id={self.user_id}")
......@@ -747,7 +751,7 @@ class HomePageDisplay(object):
guild_data = future2.result()
account = [i['uuid'] for i in acc_data]
guild = [i['uuid'] for i in guild_data]
assets_cond = []
assets_cond = ['type in(0,1)']
if self.unique_tag == 'guild_account':
assets_cond.append(f" uuid in{tuple(guild)}")
elif self.unique_tag == 'user_account':
......
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