huangyifan 1 tahun lalu
induk
melakukan
9b5e013469
3 mengubah file dengan 7 tambahan dan 4 penghapusan
  1. 3 0
      start_sync_amz.py
  2. 2 2
      sync_get_open_listing_data.py
  3. 2 2
      sync_get_order_data.py

+ 3 - 0
start_sync_amz.py

@@ -102,3 +102,6 @@ if __name__ == '__main__':
     sched.start()
 
 
+
+
+

+ 2 - 2
sync_get_open_listing_data.py

@@ -513,11 +513,11 @@ class SpApiRequest:
                 temp = df_rel.query("""listing_id==@listing_id and asin==@asin and sku==@sku and quantity==@quantity and fulfillment_channel==@fulfillment_channel and price==@price and product_id==@product_id and country_code==@country_code and seller_id==@seller_id and title==@title and image_link==@imageurl""")
                 print("需要关注数据(是否异常):",len(temp),temp.to_numpy().tolist()) if len(temp)>1 else 1
                 if len(temp)>1:
-                    temp = temp.head(1).to_numpy().tolist()
+                    # temp = temp.head(1).to_numpy().tolist()
                     df_data = df_data.append(temp_df, ignore_index=True)
                     delete_list.append((seller_id, marketplace_id, sku, listing_id, product_id))
                 # print(len(temp))
-                if len(temp)==0:
+                elif len(temp)==0:
                     df_data = df_data.append(temp_df,ignore_index=True)
                     delete_list.append((seller_id,marketplace_id,sku,listing_id,product_id))
                 row += 1

+ 2 - 2
sync_get_order_data.py

@@ -513,11 +513,11 @@ class SpApiRequest:
                 temp = df_rel.query("""listing_id==@listing_id and asin==@asin and sku==@sku and quantity==@quantity and fulfillment_channel==@fulfillment_channel and price==@price and product_id==@product_id and country_code==@country_code and seller_id==@seller_id and title==@title and image_link==@imageurl""")
                 print("需要关注数据(是否异常):",len(temp),temp.to_numpy().tolist()) if len(temp)>1 else 1
                 if len(temp)>1:
-                    temp = temp.head(1).to_numpy().tolist()
+                    # temp = temp.head(1).to_numpy().tolist()
                     df_data = df_data.append(temp_df, ignore_index=True)
                     delete_list.append((seller_id, marketplace_id, sku, listing_id, product_id))
                 # print(len(temp))
-                if len(temp)==0:
+                elif len(temp)==0:
                     df_data = df_data.append(temp_df,ignore_index=True)
                     delete_list.append((seller_id,marketplace_id,sku,listing_id,product_id))
                 row += 1