From 2eb8d411b868dc45bbc88b6ea9c8c3af730eb962 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期三, 26 七月 2023 10:05:19 +0800 Subject: [PATCH] bug修复 --- third_data/code_plate_key_manager.py | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/third_data/code_plate_key_manager.py b/third_data/code_plate_key_manager.py index 200fd10..b5074c2 100644 --- a/third_data/code_plate_key_manager.py +++ b/third_data/code_plate_key_manager.py @@ -363,8 +363,10 @@ # current_limit_up_datas: 浠婃棩瀹炴椂娑ㄥ仠 # latest_2_day_limit_up_datas锛氭渶杩�2澶╃殑瀹炴椂娑ㄥ仠锛堜笉鍚粖鏃ワ級 # limit_up_record_datas锛氫粖鏃ュ巻鍙叉定鍋� + # yesterday_current_limit_up_codes 锛� 鏄ㄦ棩娑ㄥ仠浠g爜 + # before_blocks_dict锛氬巻鍙叉定鍋滃師鍥� @classmethod - def get_can_buy_block(cls, code, current_limit_up_datas, limit_up_record_datas, + def get_can_buy_block(cls, code, current_limit_up_datas, limit_up_record_datas,yesterday_current_limit_up_codes, before_blocks_dict): # 鍔犺浇娑ㄥ仠浠g爜鐨勭洰鏍囨澘鍧� def load_code_block(): @@ -408,9 +410,9 @@ load_code_block() msg_list = [] for block in keys: - is_top_8_record, top_8_record = kpl_block_util.is_record_top_block(code, block, limit_up_record_datas, 8) + is_top_8_record, top_8_record = kpl_block_util.is_record_top_block(code, block, limit_up_record_datas, yesterday_current_limit_up_codes,8) is_top_4_current, top_4_current = kpl_block_util.is_current_top_block(code, block, current_limit_up_datas, - 4) + yesterday_current_limit_up_codes, 4) is_top_4 = is_top_8_record and is_top_4_current msg_list.append(f"\n瀹炴椂top4: {top_4_current}(娑ㄥ仠鏁伴噺锛歿len(current_limit_up_datas)})") msg_list.append(f"鍘嗗彶top8: {top_8_record}") @@ -460,11 +462,12 @@ # 鏄惁鍙互涓嬪崟 # 杩斿洖锛氭槸鍚﹀彲浠ヤ笅鍗�,娑堟伅,鏉垮潡绫诲瀷 @classmethod - def can_buy(cls, code, current_limit_up_datas, limit_up_record_datas, before_blocks_dict): + def can_buy(cls, code, current_limit_up_datas, limit_up_record_datas, yesterday_current_limit_up_codes,before_blocks_dict): if constant.TEST: return True, "", cls.BLOCK_TYPE_NONE + block, block_msg = cls.get_can_buy_block(code, current_limit_up_datas, - limit_up_record_datas, before_blocks_dict) + limit_up_record_datas,yesterday_current_limit_up_codes, before_blocks_dict) if block is None: return False, block_msg -- Gitblit v1.8.0