from app.api_data.cost_util import * from model.DateUtils import DateUtils from model.DataBaseUtils import MysqlUtils du = DateUtils() def get_accounts(filter=None): db = MysqlUtils() if filter: if filter=='MP': return db.quchen_text.getData("select account_id,access_token,name channel from advertiser_vx where (name !='' or name is not null)") else: return db.quchen_text.getData("select account_id,access_token,name channel from advertiser_qq where (name !='' or name is not null)") return db.quchen_text.getData("select account_id,access_token,name channel,'MP' flag from advertiser_vx where (name !='' or name is not null) union " "select account_id,access_token,name channel,'GDT' flag from advertiser_qq where (name !='' or name is not null)")