From 466cd5b36cd4a3bb46e8449f640c51d06b99a90d Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期二, 11 六月 2024 17:25:04 +0800
Subject: [PATCH] API输出正股详细的信息

---
 code_attribute/gpcode_manager.py |   17 ++---------------
 1 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/code_attribute/gpcode_manager.py b/code_attribute/gpcode_manager.py
index 6e19ff9..77d3f5b 100644
--- a/code_attribute/gpcode_manager.py
+++ b/code_attribute/gpcode_manager.py
@@ -76,10 +76,9 @@
     price = CodePrePriceManager.get_price_pre_cache(code)
     if price is None:
         return None
-    limit_up_price = tool.to_price(decimal.Decimal(str(price)) * decimal.Decimal("1.1"))
+    limit_up_price = tool.to_price(decimal.Decimal(str(price)) * decimal.Decimal(f"{tool.get_limit_up_rate(code)}"))
     __limit_up_price_dict[code] = limit_up_price
     return limit_up_price
-
 
 def get_price_pre_cache(code):
     price = CodePrePriceManager.get_price_pre_cache(code)
@@ -102,21 +101,9 @@
     return None
 
 
-def get_limit_up_price_by_preprice(price):
-    if price is None:
-        return None
-    return tool.to_price(decimal.Decimal(str(price)) * decimal.Decimal("1.1"))
-
-
-def get_limit_down_price_by_preprice(price):
-    if price is None:
-        return None
-    return tool.to_price(decimal.Decimal(str(price)) * decimal.Decimal("0.9"))
-
-
 # 鑾峰彇璺屽仠浠�
 def get_limit_down_price(code):
     price = CodePrePriceManager.get_price_pre_cache(code)
     if price is None:
         return None
-    return tool.to_price(decimal.Decimal(str(price)) * decimal.Decimal("0.9"))
\ No newline at end of file
+    return tool.to_price(decimal.Decimal(str(price)) * decimal.Decimal(f"{tool.get_limit_down_rate(code)}"))
\ No newline at end of file

--
Gitblit v1.8.0