|  | @@ -14,6 +14,7 @@ db=MysqlUtils()
 | 
											
												
													
														|  |  du=DateUtils()
 |  |  du=DateUtils()
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |  def get_yg_vip_channel(stage, vip_id, client_id, token):
 |  |  def get_yg_vip_channel(stage, vip_id, client_id, token):
 | 
											
												
													
														|  |      url = "https://data.yifengaf.cn:443/channeldata/data/account/list"
 |  |      url = "https://data.yifengaf.cn:443/channeldata/data/account/list"
 | 
											
												
													
														|  |      nonce = ComUtils.get_random_str()
 |  |      nonce = ComUtils.get_random_str()
 | 
											
										
											
												
													
														|  | @@ -102,7 +103,7 @@ def parse_yg_data(vip_id,stage):
 | 
											
												
													
														|  |      # print(insert_data)
 |  |      # print(insert_data)
 | 
											
												
													
														|  |      # exit(0)
 |  |      # exit(0)
 | 
											
												
													
														|  |      print("订单数:"+ str(insert_data.__len__()))
 |  |      print("订单数:"+ str(insert_data.__len__()))
 | 
											
												
													
														|  | -    db.quchen_text.executeMany("replace into ods_order values(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)",tuple(insert_data))
 |  | 
 | 
											
												
													
														|  | 
 |  | +    save_order(insert_data)
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  def get_hs_order_task(start, end, account):
 |  |  def get_hs_order_task(start, end, account):
 | 
											
										
											
												
													
														|  | @@ -133,7 +134,7 @@ def get_hs_order_task(start, end, account):
 | 
											
												
													
														|  |      if len(li) > 0:
 |  |      if len(li) > 0:
 | 
											
												
													
														|  |          print(f"花生账号:{account[2]} 有order{len(li)}个")
 |  |          print(f"花生账号:{account[2]} 有order{len(li)}个")
 | 
											
												
													
														|  |          # print(li)
 |  |          # print(li)
 | 
											
												
													
														|  | -        db.quchen_text.executeMany("replace into ods_order values (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)",li)
 |  | 
 | 
											
												
													
														|  | 
 |  | +        save_order(li)
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -198,6 +199,8 @@ def get_huasheng_order(start,end, account, merchant):
 | 
											
												
													
														|  |                       i['book_name'],
 |  |                       i['book_name'],
 | 
											
												
													
														|  |                       i['trans_id'] if i['trans_id'] != '' else i['order_num'],
 |  |                       i['trans_id'] if i['trans_id'] != '' else i['order_num'],
 | 
											
												
													
														|  |                       2 if i['order_status'] == 1 else 1
 |  |                       2 if i['order_status'] == 1 else 1
 | 
											
												
													
														|  | 
 |  | +                     # i['user_id']
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |                       )
 |  |                       )
 | 
											
												
													
														|  |                  )
 |  |                  )
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -268,7 +271,9 @@ def get_qiyue_order_task(start, end, account):
 | 
											
												
													
														|  |                       x['money'],
 |  |                       x['money'],
 | 
											
												
													
														|  |                       x['book_name'],
 |  |                       x['book_name'],
 | 
											
												
													
														|  |                       x['transaction_no'] if x['transaction_no'] != 0 else x['trade_no'],   # 订单id
 |  |                       x['transaction_no'] if x['transaction_no'] != 0 else x['trade_no'],   # 订单id
 | 
											
												
													
														|  | -                     x['state'])
 |  | 
 | 
											
												
													
														|  | 
 |  | +                     x['state']
 | 
											
												
													
														|  | 
 |  | +                     # x['user_id']
 | 
											
												
													
														|  | 
 |  | +                )
 | 
											
												
													
														|  |                       )
 |  |                       )
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |              next_page_url = result_data['next_page_url']
 |  |              next_page_url = result_data['next_page_url']
 | 
											
										
											
												
													
														|  | @@ -422,6 +427,7 @@ def get_wd_order_task(start,end,account):
 | 
											
												
													
														|  |                       x['bookTitle'] if x['bookTitle'] else '',
 |  |                       x['bookTitle'] if x['bookTitle'] else '',
 | 
											
												
													
														|  |                       x['ewTradeId'] if x.get('ewTradeId') else x['rechargeUuid'],
 |  |                       x['ewTradeId'] if x.get('ewTradeId') else x['rechargeUuid'],
 | 
											
												
													
														|  |                       2 if x['payStatus'] == 1 else 1
 |  |                       2 if x['payStatus'] == 1 else 1
 | 
											
												
													
														|  | 
 |  | +                     # ,x['userId']
 | 
											
												
													
														|  |                      )
 |  |                      )
 | 
											
												
													
														|  |                  )
 |  |                  )
 | 
											
												
													
														|  |              if len(order_item_list) < 1000:
 |  |              if len(order_item_list) < 1000:
 | 
											
										
											
												
													
														|  | @@ -489,6 +495,7 @@ def get_zd_order_task(start,end,account):
 | 
											
												
													
														|  |                      i['book_entry'],
 |  |                      i['book_entry'],
 | 
											
												
													
														|  |                      i['orderno'],
 |  |                      i['orderno'],
 | 
											
												
													
														|  |                      2 if i['status'] == '1' else 1
 |  |                      2 if i['status'] == '1' else 1
 | 
											
												
													
														|  | 
 |  | +                    # ,i['userid']
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |                  ))
 |  |                  ))
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -590,6 +597,7 @@ def get_zzy_channel_order(start, end, account, channel):
 | 
											
												
													
														|  |                  i['from_novel']['title'] if str(i['from_novel_id']) != 'None' else '',
 |  |                  i['from_novel']['title'] if str(i['from_novel_id']) != 'None' else '',
 | 
											
												
													
														|  |                  str(i['id']),
 |  |                  str(i['id']),
 | 
											
												
													
														|  |                  2 if i['status'] == 1 else 1
 |  |                  2 if i['status'] == 1 else 1
 | 
											
												
													
														|  | 
 |  | +                # ,i['id']
 | 
											
												
													
														|  |              ))
 |  |              ))
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  
 |  |  
 |