From fe8a45ff35826379e0d8d9d4462766680affa4c5 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期二, 23 四月 2024 11:01:57 +0800
Subject: [PATCH] bug修复

---
 l2/l2_data_manager_new.py |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/l2/l2_data_manager_new.py b/l2/l2_data_manager_new.py
index de56678..e6274b5 100644
--- a/l2/l2_data_manager_new.py
+++ b/l2/l2_data_manager_new.py
@@ -310,7 +310,7 @@
             if cancel_result[0]:
                 L2TradeDataProcessor.cancel_buy(code, f"F鎾�:{cancel_result[1]}")
             else:
-                l2_log.f_cancel_debug(code,f"鑾峰彇鐪熷疄鎴愪氦浣嶇殑F鎾ゆ湭鐢熸晥锛歿cancel_result[1]}")
+                l2_log.f_cancel_debug(code, f"鑾峰彇鐪熷疄鎴愪氦浣嶇殑F鎾ゆ湭鐢熸晥锛歿cancel_result[1]}")
         except Exception as e:
             logger_debug.exception(e)
 
@@ -916,9 +916,12 @@
 
         limit_up_price = gpcode_manager.get_limit_up_price(code)
 
-        if float(limit_up_price) >= constant.MAX_CODE_PRICE:
+        if constant.MIN_CODE_PRICE < float(limit_up_price) < constant.MAX_CODE_PRICE:
+            # 婊¤冻鏉′欢鐨勫崟浠�
+            pass
+        else:
             # HighIncreaseCodeManager().add_code(code)
-            return False, True, f"鑲′环澶т簬{constant.MAX_CODE_PRICE}鍧�"
+            return False, True, f"鑲′环澶т簬{constant.MAX_CODE_PRICE}鍧�/灏忎簬{constant.MIN_CODE_PRICE}鍧�"
 
         # place_order_count = cls.__PlaceOrderCountManager.get_place_order_count(code)
         # if place_order_count and place_order_count >= 10:
@@ -1279,7 +1282,8 @@
             cancel_result = cls.__cancel_buy(code)
             if cancel_result:
                 trade_result_manager.real_cancel_success(code, order_begin_pos.buy_single_index,
-                                                         order_begin_pos.buy_exec_index, total_datas,from_real_cancel = True)
+                                                         order_begin_pos.buy_exec_index, total_datas,
+                                                         from_real_cancel=True)
         l2_log.debug(code, "鎵ц鎾ゅ崟缁撴潫锛屽師鍥狅細{}", msg)
         return True
 
@@ -2179,10 +2183,9 @@
 
         is_at_limit_up = False
         current_sell_data = cls.__L2MarketSellManager.get_current_total_sell_data(code)
-        if current_sell_data and current_sell_data[1] ==0:
+        if current_sell_data and current_sell_data[1] == 0:
             # 鏉夸笂鏀鹃噺涔�
             is_at_limit_up = True
-
 
         threshold_money = threshold_money_origin
         # 鐩爣鎵嬫暟

--
Gitblit v1.8.0