Commit b328b7f9 authored by xianyang's avatar xianyang

优化财务详情查询

parent e0702899
...@@ -410,7 +410,7 @@ class AccountStatistics(object): ...@@ -410,7 +410,7 @@ class AccountStatistics(object):
"""处理可消费,可提现数据""" """处理可消费,可提现数据"""
bk = pd.DataFrame(special_data) bk = pd.DataFrame(special_data)
for old in old_data: for old in old_data:
df = bk[(bk["guild_id"] == old['guild_id']) & (bk["amount_type"] == 2)] # 可消费 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') serializer_info = df.to_dict(orient='records')
if serializer_info: if serializer_info:
old['con_income'] = serializer_info[0]['income'] old['con_income'] = serializer_info[0]['income']
...@@ -418,7 +418,7 @@ class AccountStatistics(object): ...@@ -418,7 +418,7 @@ class AccountStatistics(object):
else: else:
old['con_income'] = 0 old['con_income'] = 0
old['con_outcome'] = 0 old['con_outcome'] = 0
df = bk[(bk["guild_id"] == old['guild_id']) & (bk["amount_type"] == 3)] # 可提现 df = bk[(bk["guild_id"] == old['guild_id']) & (bk["create_time"] == old['create_time']) & (bk["amount_type"] == 3)] # 可提现
serializer_info = df.to_dict(orient='records') serializer_info = df.to_dict(orient='records')
if serializer_info: if serializer_info:
old['with_income'] = serializer_info[0]['income'] old['with_income'] = serializer_info[0]['income']
......
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