Commit cae9c32b authored by xianyang's avatar xianyang

优化异常数据修复列表

parent 964d6021
......@@ -379,21 +379,9 @@ def create_fix_table(db: Session, param, h_list):
def recovery_thead_task(data):
account_sql = f"select name from fi_account where uuid='{data['uuid']}'"
user_sql = f"select nick_name from v2_user where uuid='{data['uuid']}'"
guild_sql = f"select guild_name from guild where uuid='{data['uuid']}'"
with ThreadPoolExecutor(max_workers=2) as pool:
future1 = pool.submit(LinkMysql(env.DB_3YV2).query_mysql, account_sql)
future2 = pool.submit(LinkMysql(env.DB_3YV2).query_mysql, user_sql)
future3 = pool.submit(LinkMysql(env.DB_3YV2).query_mysql, guild_sql)
acc_data = future1.result()
user_data = future2.result()
guild_data = future3.result()
acc_data = LinkMysql(env.DB_3YV2).query_mysql(account_sql)
if acc_data:
data['name'] = acc_data[0]['name']
elif user_data:
data['name'] = user_data[0]['nick_name']
elif guild_data:
data['name'] = guild_data[0]['guild_name']
else:
data['name'] = data['uuid']
data['out_money'] = float(data['out_money'])
......
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