From efe62c0c92bee36da5179f34bb73e8ee4db6f814 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期二, 10 六月 2025 10:37:41 +0800 Subject: [PATCH] 买入金额>=30亿/L后撤只囊括100w以上的 --- code_attribute/code_data_util.py | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/code_attribute/code_data_util.py b/code_attribute/code_data_util.py index 7abbee5..b8fbd25 100644 --- a/code_attribute/code_data_util.py +++ b/code_attribute/code_data_util.py @@ -4,14 +4,12 @@ # 鑲$エ浠g爜鐩稿叧鐨勫弬鏁� import decimal -import time from code_attribute import gpcode_manager -from db import mysql_data_delegate as mysql_data, redis_manager_delegate as redis_manager +from db import redis_manager_delegate as redis_manager from db.mysql_data_delegate import Mysqldb from db.redis_manager_delegate import RedisUtils from utils import tool -from utils.tool import async_call __db = 0 _redisManager = redis_manager.RedisManager(0) @@ -19,8 +17,6 @@ # 浠g爜瀵瑰簲鐨勪环鏍兼槸鍚︽纭� def is_same_code_with_price(code, price): - if code == '600066': - print('杩涘叆璋冭瘯') # 鏄ㄦ棩鏀剁洏浠� price_close = gpcode_manager.CodePrePriceManager.get_price_pre_cache(code) max_price = tool.to_price(decimal.Decimal(str(price_close)) * decimal.Decimal(tool.get_limit_up_rate(code))) @@ -84,7 +80,9 @@ @return: """ fresults = cls.__mysql.select_one(f"select count(code) from kpl_zylt_volume where update_time >= '{tool.get_now_date_str()}'") - return fresults[0] + if fresults: + return fresults[0] + return 0 -- Gitblit v1.8.0