Commit 738154ce authored by xianyang's avatar xianyang

主播账户排除-测试说的

parent faa5c7c7
......@@ -83,22 +83,22 @@ class HDUd():
def get_account_list(self, name, page, size):
"""账户列表,查询"""
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)
if number:
count = number[0].get("num")
else:
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)
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)
if number:
count = number[0].get("num")
else:
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)
if not query_res:
return [], 0
......
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