ck 4 vuotta sitten
vanhempi
commit
54324153aa
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  1. 3 1
      dgp/tests/get_order_dairly_wending.py

+ 3 - 1
dgp/tests/get_order_dairly_wending.py

@@ -181,7 +181,7 @@ def get_wending_order_task(st,et,account):
 
             for x in order_item_list:
                 y={}
-                y['date'] = (int(x['payTime']//1000)+ 8 * 3600) // 86400 * 86400 - 8 * 3600    ## 网易的是13位时间戳
+
                 y['platform'] = '文鼎'
                 y['channel'] = x['wx_mpName']            ## 公众号名称
                 y['channel_id'] = x['wx_originalId']     ## 公众号id
@@ -194,6 +194,7 @@ def get_wending_order_task(st,et,account):
                 uid_reg_time = time.strftime("%Y-%m-%d %H:%M:%S",time.localtime(x['userRegisterTime']//1000))     ## 13位时间戳 》标准时间
                 y['reg_time']= uid_reg_time              ## 用户注册时间
                 y['order_id']= x['ewTradeId']            ## 订单id
+                y['date']= int(time.mktime(time.strptime(createTime[:10],'%Y-%m-%d')))
                 y = sorted(y.items(), key=lambda item:item[0])
                 y = dict(y)
                 y = tuple(y.values())
@@ -238,3 +239,4 @@ if __name__ == '__main__':
 
     start_order_job_wending(st,et)
 
+