|
@@ -0,0 +1,54 @@
|
|
|
+## 上一个月核对,补数据脚本
|
|
|
+import get_order_dairly_yangguang
|
|
|
+import get_order_dairly_wending
|
|
|
+from util import platform_order_api_util
|
|
|
+
|
|
|
+from util import platform_config_util
|
|
|
+from util import date_util
|
|
|
+
|
|
|
+from util import db_order_util
|
|
|
+from util import platform_config_util
|
|
|
+
|
|
|
+
|
|
|
+def get_order_job(st_unix,et_unix):
|
|
|
+ print('查询开始时间:', st_unix, date_util.getSecondsToDatetime(st_unix))
|
|
|
+ print('查询结束时间:', et_unix, date_util.getSecondsToDatetime(et_unix))
|
|
|
+ ##
|
|
|
+ '''
|
|
|
+ ## 直接读取所有账号
|
|
|
+ account_list_yuewen = platform_config_util.get_yuewen_account_list()
|
|
|
+ account_list_zhangzhongyun = platform_config_util.get_zhangzhongyun_account_list()
|
|
|
+ account_list_huasheng = platform_config_util.get_huasheng_account_list()
|
|
|
+ account_list_youshuge = platform_config_util.get_youshuge_account_list()
|
|
|
+ account_list_zhangdu = platform_config_util.get_zhangdu_account_list()
|
|
|
+
|
|
|
+ account_list_wending = platform_config_util.get_wending_account_list()
|
|
|
+ account_list_yangguang = get_yangguang_account_list()
|
|
|
+ '''
|
|
|
+ ## 数据缺失账户读取
|
|
|
+ account_list_yuewen = platform_config_util.get_account_list('阅文', 'new_account/new_yuewen.csv')
|
|
|
+ account_list_zhangzhongyun = platform_config_util.get_account_list('掌中云', 'new_account/new_zhangzhongyun.csv')
|
|
|
+ account_list_huasheng = platform_config_util.get_account_list('花生', 'new_account/new_huasheng.csv')
|
|
|
+ account_list_youshuge = platform_config_util.get_account_list('悠书阁', 'new_account/new_youshuge.csv')
|
|
|
+ account_list_zhangdu = platform_config_util.get_account_list('掌读', 'new_account/new_zhangdu.csv')
|
|
|
+ account_list_wending = platform_config_util.get_account_list('文鼎', 'new_account/new_wending.csv')
|
|
|
+ account_list_yangguang = platform_config_util.get_account_list('阳光', 'new_account/new_yangguang.csv')
|
|
|
+
|
|
|
+
|
|
|
+ db_order_util.batch_save_order(platform_order_api_util.get_zhangzhongyun_order(st_unix, et_unix,account_list_zhangzhongyun))
|
|
|
+ db_order_util.batch_save_order(platform_order_api_util.get_yuewen_order(st_unix, et_unix,account_list_yuewen))
|
|
|
+ db_order_util.batch_save_order(platform_order_api_util.get_huasheng_order(st_unix, et_unix,account_list_huasheng))
|
|
|
+ db_order_util.batch_save_order(platform_order_api_util.get_youshuge_order(st_unix, et_unix,account_list_youshuge))
|
|
|
+ db_order_util.batch_save_order(platform_order_api_util.get_zhangdu_order(st_unix, et_unix,account_list_zhangdu))
|
|
|
+
|
|
|
+ db_order_util.batch_save_order(get_order_dairly_wending.get_wending_order(st_unix, et_unix,account_list_wending))
|
|
|
+ db_order_util.batch_save_order(get_order_dairly_yangguang.get_yangguang_order(st_unix, et_unix,account_list_yangguang))
|
|
|
+
|
|
|
+
|
|
|
+if __name__ == "__main__":
|
|
|
+ st_unix = 1604505600 # 2020/11/05 00:0:0
|
|
|
+ et_unix = 1604937600 # 2020/11/10 00:0:0
|
|
|
+ get_order_job(st_unix,et_unix)
|
|
|
+
|
|
|
+
|
|
|
+
|