From 9d39b293bde97f31f522010373aad1dd3f654c07 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期四, 25 七月 2024 17:23:07 +0800
Subject: [PATCH] 策略修改

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

diff --git a/code_attribute/gpcode_manager.py b/code_attribute/gpcode_manager.py
index 6e19ff9..4cc9050 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,11 @@
     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)}"))
+
+

--
Gitblit v1.8.0