TxCostUtils.py 1004 B

12345678910111213141516171819202122232425262728293031
  1. from model.DateUtils import DateUtils
  2. du = DateUtils()
  3. # def get_accounts(filter=None):
  4. # db = MysqlUtils()
  5. # if filter:
  6. # if filter=='MP':
  7. # return db.quchen_text.getData("select account_id,access_token,name channel from advertiser_vxwhere (name !='' or name is not null)")
  8. #
  9. # else:
  10. # return db.quchen_text.getData("select account_id,access_token,name channel"
  11. # " from advertiser_qq where (name !='' or name is not null)")
  12. #
  13. # return db.quchen_text.getData("select account_id,access_token,name channel,'MP' flag "
  14. # "from advertiser_vx where (name !='' or name is not null) union "
  15. # "select account_id,access_token,name channel,'GDT' flag"
  16. # " from advertiser_qq where (name !='' or name is not null)")
  17. if __name__ == '__main__':
  18. account_id = "19521440"
  19. token = "5ea8737494daecf9e954df56b250826e"
  20. st = "2021-05-01"
  21. et = '2021-05-20'
  22. print(mp_campaign_daily_report(account_id,token,st,et).__len__())