TxCostUtils.py 1.1 KB

123456789101112131415161718192021222324252627282930313233
  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_vxwhere (name !='' or name is not null)")
  10. #
  11. # else:
  12. # return db.quchen_text.getData("select account_id,access_token,name channel"
  13. # " from advertiser_qq where (name !='' or name is not null)")
  14. #
  15. # return db.quchen_text.getData("select account_id,access_token,name channel,'MP' flag "
  16. # "from advertiser_vx where (name !='' or name is not null) union "
  17. # "select account_id,access_token,name channel,'GDT' flag"
  18. # " from advertiser_qq where (name !='' or name is not null)")
  19. if __name__ == '__main__':
  20. account_id = "19521440"
  21. token = "5ea8737494daecf9e954df56b250826e"
  22. st = "2021-05-01"
  23. et = '2021-05-20'
  24. print(mp_campaign_daily_report(account_id,token,st,et).__len__())