Commit 0962b454 authored by xianyang's avatar xianyang

质押金账户优化,移出

parent ac4b41d1
...@@ -338,7 +338,7 @@ def out_income_combine(data): ...@@ -338,7 +338,7 @@ def out_income_combine(data):
def query_account_data(): def query_account_data():
account_sql = f"select name,unique_tag,uuid from fi_account where unique_tag not " \ account_sql = f"select name,unique_tag,uuid from fi_account where unique_tag not " \
f"in('guild_account', 'anchor_account', 'user_account', 'knapsack_account')" f"in('guild_account', 'anchor_account', 'user_account', 'knapsack_account','pledgeDeduction')"
account = LinkMysql(env.DB_3YV2).query_mysql(account_sql) account = LinkMysql(env.DB_3YV2).query_mysql(account_sql)
return account return account
...@@ -430,8 +430,8 @@ class AccountStatistics(object): ...@@ -430,8 +430,8 @@ class AccountStatistics(object):
data, total = self.guild_calculation() data, total = self.guild_calculation()
return data, total, 0 return data, total, 0
if self.unique == "pledgeDeduction": if self.unique == "pledgeDeduction":
data, total = self. guild_calculation_pledge() data, total, money = self. guild_calculation_pledge()
return data, total, 0 return data, total, money
if self.unique == "user_account": if self.unique == "user_account":
if self.user_id: if self.user_id:
user_sql = f"select uuid from v2_user where user_id={self.user_id}" user_sql = f"select uuid from v2_user where user_id={self.user_id}"
...@@ -501,7 +501,7 @@ class AccountStatistics(object): ...@@ -501,7 +501,7 @@ class AccountStatistics(object):
guild_sql = f"select ice_uuid from guild where id={self.user_id}" guild_sql = f"select ice_uuid from guild where id={self.user_id}"
res_data = LinkMysql(env.DB_3YV2).query_mysql(guild_sql) res_data = LinkMysql(env.DB_3YV2).query_mysql(guild_sql)
if not res_data: if not res_data:
return [], 0 return [], 0, 0
cp_cond.append(f" uuid='{res_data[0]['ice_uuid']}'") cp_cond.append(f" uuid='{res_data[0]['ice_uuid']}'")
result_list = [] result_list = []
for i in month_tuple: for i in month_tuple:
...@@ -514,7 +514,10 @@ class AccountStatistics(object): ...@@ -514,7 +514,10 @@ class AccountStatistics(object):
except Exception as e: except Exception as e:
Logger(40).logger.error(f"公会质押金处理-没有此表{table},或者检查sql:{cp_sql},是否正确!失败原因{str(e)}") Logger(40).logger.error(f"公会质押金处理-没有此表{table},或者检查sql:{cp_sql},是否正确!失败原因{str(e)}")
continue continue
return result_list[int(self.page - 1) * self.size: self.page * self.size], len(result_list) money = 0
for i in result_list:
money = money + i['income'] + i['outcome']
return result_list[int(self.page - 1) * self.size: self.page * self.size], len(result_list), money
def delete_specify_field(data): def delete_specify_field(data):
...@@ -625,6 +628,8 @@ class HomePageDisplay(object): ...@@ -625,6 +628,8 @@ class HomePageDisplay(object):
assets_cond.append(f" uuid not in{tuple(guild + account)} and amount_type in('consumable','withdrawable')") assets_cond.append(f" uuid not in{tuple(guild + account)} and amount_type in('consumable','withdrawable')")
elif self.unique_tag == 'knapsack_account': elif self.unique_tag == 'knapsack_account':
assets_cond.append(f" amount_type='backpack'") assets_cond.append(f" amount_type='backpack'")
elif self.unique_tag == 'pledgeDeduction':
assets_cond.append(f" reference_type in('marginRecharge','pledgeDeduction')")
else: else:
acc_uuid = [i['uuid'] for i in acc_data if i['unique_tag'] == self.unique_tag] acc_uuid = [i['uuid'] for i in acc_data if i['unique_tag'] == self.unique_tag]
if not acc_uuid: if not acc_uuid:
......
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