From b0dd299a9a9ad3e3ce3b19e6476d2155a0dfad6a Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期一, 25 九月 2023 11:16:58 +0800
Subject: [PATCH] 买15块以下的代码

---
 third_data/code_plate_key_manager.py |   24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/third_data/code_plate_key_manager.py b/third_data/code_plate_key_manager.py
index b47fb4d..07a97ef 100644
--- a/third_data/code_plate_key_manager.py
+++ b/third_data/code_plate_key_manager.py
@@ -421,11 +421,13 @@
 
     @classmethod
     def __remove_from_l2(cls, code, msg):
+        # TODO 鏆傛椂涓嶆牴鎹韩浣嶇Щ闄や唬鐮�
+        return
         # 涓嬭繃鍗曠殑浠g爜涓嶇Щ闄�
         if trade_manager.CodesTradeStateManager().get_trade_state_cache(code) != trade_manager.TRADE_STATE_NOT_TRADE:
             # 鍙涓嬭繃鍗曠殑灏变笉绉婚櫎
             return
-        l2_trade_util.forbidden_trade(code)
+        l2_trade_util.forbidden_trade(code, msg=msg)
         logger_kpl_block_can_buy.info(msg)
 
     @classmethod
@@ -534,8 +536,11 @@
     # 杩斿洖锛氭槸鍚﹀彲浠ヤ笅鍗�,娑堟伅,鏉垮潡绫诲瀷
     @classmethod
     def can_buy(cls, code):
-        # if constant.TEST:
-        #     return True, cls.BLOCK_TYPE_NONE
+        if constant.TEST:
+            return True, cls.BLOCK_TYPE_NONE
+        if True:
+            # 娴嬭瘯
+            return True, "涓嶅垽鏂澘鍧楄韩浣�"
         return cls.__can_buy_compute_result_dict.get(code)
 
     @classmethod
@@ -610,15 +615,18 @@
                                  before_blocks_dict):
         # 鍔犺浇娑ㄥ仠浠g爜鐨勭洰鏍囨澘鍧�
         def load_code_block():
-            for d in limit_up_record_datas:
-                if d[2] in constant.KPL_INVALID_BLOCKS and d[3] in before_blocks_dict:
-                    code_limit_up_reason_dict[d[3]] = list(before_blocks_dict.get(d[3]))[0]
-                else:
-                    code_limit_up_reason_dict[d[3]] = d[2]
+            if limit_up_record_datas:
+                for d in limit_up_record_datas:
+                    if d[2] in constant.KPL_INVALID_BLOCKS and d[3] in before_blocks_dict:
+                        code_limit_up_reason_dict[d[3]] = list(before_blocks_dict.get(d[3]))[0]
+                    else:
+                        code_limit_up_reason_dict[d[3]] = d[2]
             return code_limit_up_reason_dict
 
         if current_limit_up_datas is None:
             current_limit_up_datas = []
+        if limit_up_record_datas is None:
+            limit_up_record_datas = []
         code_limit_up_reason_dict = {}
         load_code_block()
         can_buy, msg = cls.__is_block_can_buy(code, block, current_limit_up_datas, code_limit_up_reason_dict,

--
Gitblit v1.8.0