Commit 3a145c0e authored by xupeng's avatar xupeng

Merge remote-tracking branch 'origin/development' into development

parents a5b0541b 738154ce
...@@ -83,22 +83,22 @@ class HDUd(): ...@@ -83,22 +83,22 @@ class HDUd():
def get_account_list(self, name, page, size): def get_account_list(self, name, page, size):
"""账户列表,查询""" """账户列表,查询"""
if name: if name:
count_sql = f"select count(id) as num from fi_account where name like '%{name}%'" count_sql = f"select count(id) as num from fi_account where name like '%{name}%' and unique_tag!='anchor_account'"
number = LinkMysql(env.DB_3YV2).query_mysql(count_sql) number = LinkMysql(env.DB_3YV2).query_mysql(count_sql)
if number: if number:
count = number[0].get("num") count = number[0].get("num")
else: else:
count = 0 count = 0
data_sql = f"select id,name,unique_tag,uuid,config_key,beneficiary,description,create_time, income, output from fi_account where name like '%{name}%' ORDER BY id DESC LIMIT {(int(page) - 1) * size},{size}" data_sql = f"select id,name,unique_tag,uuid,config_key,beneficiary,description,create_time, income, output from fi_account where name like '%{name}%' and unique_tag!='anchor_account' ORDER BY id DESC LIMIT {(int(page) - 1) * size},{size}"
query_res = LinkMysql(env.DB_3YV2).query_mysql(data_sql) query_res = LinkMysql(env.DB_3YV2).query_mysql(data_sql)
else: else:
count_sql = f"select count(id) as num from fi_account" count_sql = f"select count(id) as num from fi_account where unique_tag!='anchor_account'"
number = LinkMysql(env.DB_3YV2).query_mysql(count_sql) number = LinkMysql(env.DB_3YV2).query_mysql(count_sql)
if number: if number:
count = number[0].get("num") count = number[0].get("num")
else: else:
count = 0 count = 0
data_sql = f"select id,name,unique_tag,uuid,config_key,beneficiary,description,create_time, income, output from fi_account ORDER BY id DESC LIMIT {(int(page) - 1) * size},{size}" data_sql = f"select id,name,unique_tag,uuid,config_key,beneficiary,description,create_time, income, output from fi_account where unique_tag!='anchor_account' ORDER BY id DESC LIMIT {(int(page) - 1) * size},{size}"
query_res = LinkMysql(env.DB_3YV2).query_mysql(data_sql) query_res = LinkMysql(env.DB_3YV2).query_mysql(data_sql)
if not query_res: if not query_res:
return [], 0 return [], 0
......
...@@ -138,7 +138,7 @@ def paymentset_guild_data(page, size, start_time, end_time): ...@@ -138,7 +138,7 @@ def paymentset_guild_data(page, size, start_time, end_time):
def outon_account_data(): def outon_account_data():
account_sql = f"select id,name,description as remark,unique_tag,uuid from fi_account" account_sql = f"select id,name,description as remark,unique_tag,uuid from fi_account where unique_tag not in('anchor_account')"
account = LinkMysql(env.DB_3YV2).query_mysql(account_sql) account = LinkMysql(env.DB_3YV2).query_mysql(account_sql)
return account, len(account) return account, len(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