From f2f2c572ec9440c30448287b326ac565cde62fb7 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期三, 03 四月 2024 10:30:07 +0800
Subject: [PATCH] bug修改

---
 l2/l2_transaction_data_manager.py |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/l2/l2_transaction_data_manager.py b/l2/l2_transaction_data_manager.py
index 147463e..578e996 100644
--- a/l2/l2_transaction_data_manager.py
+++ b/l2/l2_transaction_data_manager.py
@@ -150,7 +150,6 @@
                     # 灏佸瓨鏁版嵁锛岃绠楁柊璧风偣
                     # 澶т簬50w鐨勫崠鍗曟墠浼氫繚瀛�
                     # 澶т簬50w鍔犲叆鍗栧崟
-                    cls.__latest_all_sell_orders_dict[code].append(info)
                     money = info[1] * info[2]
                     if money >= 500000:
                         if is_active_sell(info[0]):
@@ -214,17 +213,20 @@
 
     # 鑾峰彇鏈�杩戞垚浜ゆ暟鎹�
     @classmethod
-    def get_latest_transaction_datas(cls, code, min_sell_order_no=None):
+    def get_latest_transaction_datas(cls, code, min_sell_order_no=None, min_deal_time=None):
         total_orders = []
         sell_orders = cls.__latest_all_sell_orders_dict.get(code)
         if sell_orders:
             for i in range(len(sell_orders) - 1, -1, -1):
-                if min_sell_order_no and min_sell_order_no > sell_orders[i][0]:
+                if min_deal_time and tool.trade_time_sub(min_deal_time,
+                                                         l2_huaxin_util.convert_time(sell_orders[i][3][0])) > 0:
                     break
+
+                if min_sell_order_no and min_sell_order_no > sell_orders[i][0]:
+                    continue
                 total_orders.append(sell_orders[i])
-            total_orders.extend(sell_orders)
         if code in cls.__latest_sell_order_dict:
-            if min_sell_order_no :
+            if min_sell_order_no:
                 if cls.__latest_sell_order_dict[code][0] >= min_sell_order_no:
                     total_orders.append(cls.__latest_sell_order_dict[code])
             else:

--
Gitblit v1.8.0