From 2727748dff6ddc068fe94c820eb79ef5a051605c Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期二, 11 六月 2024 23:50:27 +0800
Subject: [PATCH] 兼容30代码卖出

---
 code_atrribute/gpcode_manager.py |   16 ++--------------
 1 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/code_atrribute/gpcode_manager.py b/code_atrribute/gpcode_manager.py
index 3946975..5aac92d 100644
--- a/code_atrribute/gpcode_manager.py
+++ b/code_atrribute/gpcode_manager.py
@@ -77,7 +77,7 @@
     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
 
@@ -103,21 +103,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