TxCostUtils.py 786 B

12345678910111213141516
  1. from app.api_data.cost_util import *
  2. from model.DateUtils import DateUtils
  3. from model.DataBaseUtils import MysqlUtils
  4. du = DateUtils()
  5. def get_accounts(filter=None):
  6. db = MysqlUtils()
  7. if filter:
  8. if filter=='MP':
  9. return db.quchen_text.getData("select account_id,access_token,name channel from advertiser_vx where (name !='' or name is not null)")
  10. else:
  11. return db.quchen_text.getData("select account_id,access_token,name channel from advertiser_qq where (name !='' or name is not null)")
  12. 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 "
  13. "select account_id,access_token,name channel,'GDT' flag from advertiser_qq where (name !='' or name is not null)")