From 0e921bc8d68e830f15bb049dfb84b22bc05db788 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期四, 15 八月 2024 09:49:50 +0800 Subject: [PATCH] bug修复 --- code_attribute/gpcode_manager.py | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/code_attribute/gpcode_manager.py b/code_attribute/gpcode_manager.py index 3776155..ff4f641 100644 --- a/code_attribute/gpcode_manager.py +++ b/code_attribute/gpcode_manager.py @@ -595,8 +595,7 @@ # 璁剧疆鏀剁洏浠� @classmethod def set_price_pre(cls, code, price, force=False): - codes = get_gp_list() - if code not in codes and not FirstCodeManager().is_in_first_record_cache(code) and not force: + if code in cls.__price_pre_cache and not force: return price = round(float(price), 2) logger_pre_close_price.info(f"{code}-{price}") @@ -619,6 +618,13 @@ return limit_up_price +def get_limit_up_price_as_num(code): + limit_up_price = get_limit_up_price(code) + if limit_up_price: + return round(float(limit_up_price), 2) + return None + + def get_limit_up_price_cache(code): if code in __limit_up_price_dict: return __limit_up_price_dict[code] -- Gitblit v1.8.0