From 7cd10cd4896bd15345968cde6c76cee33b367533 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期四, 29 八月 2024 13:48:15 +0800 Subject: [PATCH] bug修复 --- third_data/code_plate_key_manager.py | 21 ++++++++------------- 1 files changed, 8 insertions(+), 13 deletions(-) diff --git a/third_data/code_plate_key_manager.py b/third_data/code_plate_key_manager.py index 57c7ef1..4f0be3a 100644 --- a/third_data/code_plate_key_manager.py +++ b/third_data/code_plate_key_manager.py @@ -512,7 +512,7 @@ return self.__redisManager.getRedis() # 杩斿洖key闆嗗悎(鎺掗櫎鏃犳晥鏉垮潡),浠婃棩娑ㄥ仠鍘熷洜,浠婃棩鍘嗗彶娑ㄥ仠鍘熷洜,鍘嗗彶娑ㄥ仠鍘熷洜,浜岀骇,绮鹃�夋澘鍧� - def get_plate_keys(self, code, contains_today = True): + def get_plate_keys(self, code, contains_today=True): """ 鑾峰彇浠g爜鐨勬澘鍧�: 锛�180澶╃殑娑ㄥ仠鍘熷洜+鎺ㄨ崘鍘熷洜锛�+浠婃棩娑ㄥ仠鍘熷洜+浠婃棩娑ㄥ仠鎺ㄨ崘鍘熷洜+浠婃棩鎺ㄨ崘鍘熷洜 @param code: @@ -1050,8 +1050,6 @@ cls.__can_buy_compute_result_dict[code] = ( can_buy_blocks, unique, msg, can_buy_strong_blocks, keys, active_buy_blocks) - - @classmethod def compute_open_limit_up_code_dict_for_radical_buy(cls, current_limit_up_datas): """ @@ -1059,17 +1057,18 @@ @param current_limit_up_datas: @return: """ - time_str = datetime.datetime.now().strftime("%Y-%m-%d") + " 09:30:00" - timestamp = time.mktime(time.strptime(time_str, '%Y-%m-%d %H:%M:%S')) + timestamp_start = time.mktime( + time.strptime(datetime.datetime.now().strftime("%Y-%m-%d") + " 09:25:00", '%Y-%m-%d %H:%M:%S')) + timestamp_end = time.mktime(time.strptime(datetime.datetime.now().strftime("%Y-%m-%d") + " 09:30:00", '%Y-%m-%d %H:%M:%S')) temp_dict = {} for d in current_limit_up_datas: code = d[0] # d: (浠g爜, 鍚嶇О, 棣栨娑ㄥ仠鏃堕棿, 鏈�杩戞定鍋滄椂闂�, 鍑犳澘, 娑ㄥ仠鍘熷洜, 鏉垮潡, 瀹為檯娴侀��, 涓诲姏鍑�棰�,娑ㄥ仠鍘熷洜浠g爜,娑ㄥ仠鍘熷洜浠g爜鏁伴噺) # 璁$畻鏄惁寮�1 - if int(d[2]) >= timestamp: + if int(d[2]) >= timestamp_end or int(d[2]) < timestamp_start: continue # 鍓旈櫎5鏉夸互涓婄殑 - if d[4].find("杩炴澘") > 0 and int(d[4].replace("杩炴澘","")) >=5: + if d[4].find("杩炴澘") > 0 and int(d[4].replace("杩炴澘", "")) >= 5: continue buy1_money = huaxin_l1_data_manager.get_buy1_money(code) if not buy1_money or buy1_money < 1e8: @@ -1077,13 +1076,12 @@ if not tool.is_can_buy_code(code): continue # 涔�1鏄惁澶т簬1浜� - blocks = {d[5]} + blocks = {d[5]} if d[6]: blocks |= set(d[6].split("銆�")) - blocks-=constant.KPL_INVALID_BLOCKS + blocks -= constant.KPL_INVALID_BLOCKS temp_dict[code] = (kpl_util.get_high_level_count(d[4]), d[6]) kpl_data_constant.open_limit_up_code_dict_for_radical_buy = temp_dict - @classmethod def is_radical_buy(cls, code): @@ -1099,9 +1097,6 @@ # 鑾峰彇浠g爜鐨勬澘鍧� keys_, k1_, k11_, k2_, k3_, k4_ = cls.__TargetCodePlateKeyManager.get_plate_keys(code, contains_today=False) # 鑾峰彇 - - - if __name__ == "__main__": -- Gitblit v1.8.0