1234567891011121314151617181920212223242526272829 |
- # -*- coding: utf-8 -*-
- # !/usr/bin/env python
- import os
- import sys
- PROJECT_ROOT = os.path.join(os.path.abspath(os.path.split(os.path.realpath(__file__))[0] + "/.."), '..')
- sys.path.insert(0, PROJECT_ROOT)
- from script.base import init_env
- os.environ["DJANGO_SETTINGS_MODULE"] = "configs.production_local"
- init_env(False)
- from apps.web.core.models import WechatPayApp
- from apps.web.core.payment.wechat import WechatPaymentGateway
- bill_date = '2021-01-01'
- def download_bill_file():
- result = WechatPaymentGateway(
- app = WechatPayApp.objects(mchid = '1480791292').first()).download_bill(
- bill_date = '20211001')
- if __name__ == '__main__':
- download_bill_file()
|