From 7545d5e6930da8b4679c7c4ff2187de810c36361 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期五, 12 四月 2024 10:10:10 +0800
Subject: [PATCH] bug修复

---
 l2/place_order_single_data_manager.py |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/l2/place_order_single_data_manager.py b/l2/place_order_single_data_manager.py
index bff65d9..9b37b6c 100644
--- a/l2/place_order_single_data_manager.py
+++ b/l2/place_order_single_data_manager.py
@@ -1,7 +1,7 @@
 """
 涓嬪崟淇″彿绠$悊
 """
-from l2 import l2_data_util, l2_log
+from l2 import l2_log
 from log_module.log import logger_l2_trade_buy, logger_debug
 
 
@@ -23,13 +23,14 @@
         @param data:
         @return:
         """
-        l2_log.info(code, logger_l2_trade_buy,f"娑ㄥ仠鍗栨暟鎹細{data['val']['orderNo']}")
-        if code not in  cls.__latest_limit_up_sell_list_dict:
+        l2_log.info(code, logger_l2_trade_buy, f"娑ㄥ仠鍗栨暟鎹細{data['val']['orderNo']}")
+        if code not in cls.__latest_limit_up_sell_list_dict:
             cls.__latest_limit_up_sell_list_dict[code] = []
         cls.__latest_limit_up_sell_list_dict[code].append(data)
         if code not in cls.__latest_limit_up_sell_order_no_index_dict:
             cls.__latest_limit_up_sell_order_no_index_dict[code] = {}
-        cls.__latest_limit_up_sell_order_no_index_dict[code][data['val']['orderNo']] = len(cls.__latest_limit_up_sell_list_dict[code]) - 1
+        cls.__latest_limit_up_sell_order_no_index_dict[code][data['val']['orderNo']] = len(
+            cls.__latest_limit_up_sell_list_dict[code]) - 1
 
     @classmethod
     def add_l2_delegate_limit_up_sell_cancel(cls, code, order_no):
@@ -74,9 +75,9 @@
             if not sell_list:
                 return
             sell_info = sell_list[-1]
-            if str(sell_no) == sell_info['val']['orderNo'] and sell_info["val"]["num"] == cls.__latest_sell_data[code][1]//100:
+            if sell_no == sell_info['val']['orderNo'] and sell_info["val"]["num"] == cls.__latest_sell_data[code][
+                1] // 100:
                 # 鎴愪氦瀹屾垚
                 l2_log.info(code, logger_l2_trade_buy, f"鎵惧埌鏈�杩戠殑琚姩娑ㄥ仠鍗栧崟鏁版嵁锛歿data['val']['orderNo']}, 鍙互瑙﹀彂涓嬪崟")
         except Exception as e:
             logger_debug.exception(e)
-

--
Gitblit v1.8.0