from pot_libs.mysql_util.mysql_util import MysqlUtil from pot_libs.settings import SETTING async def search_dao(sql): async with MysqlUtil(db=SETTING.mysql_zhiwei_u_db) as conn: data = await conn.fetchall(sql) return data async def total_search_dao(sql): """搜索条数 """ async with MysqlUtil(db=SETTING.mysql_zhiwei_u_db) as conn: data = await conn.fetchone(sql) return data["total"]