From cbe19ea6066a600cbd0b5110db5d43f8252d14a8 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期四, 13 六月 2024 11:23:53 +0800 Subject: [PATCH] L撤成交进度相关改进 --- l2_data_util.py | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/l2_data_util.py b/l2_data_util.py index af18fa3..efaa196 100644 --- a/l2_data_util.py +++ b/l2_data_util.py @@ -32,7 +32,7 @@ price = float(val["price"]) money = price * val["num"] if price > 3.0: - if money >= 30000: + if money >= 29900 or val["num"] >= 7999: return True else: return False @@ -47,10 +47,10 @@ # 鑾峰彇澶ц祫閲戠殑閲戦 def get_big_money_val(limit_up_price): if limit_up_price > 3.0: - return 300 * 10000 + return min(299 * 10000, round(limit_up_price * 7999 * 100)) else: - max_money = limit_up_price * 10000 - return max_money * 0.95 + max_money = limit_up_price * 10000 * 100 + return int(max_money * 0.95) # if int(val["num"]) >= constant.BIG_MONEY_NUM: @@ -179,7 +179,8 @@ if abs(get_time_as_seconds(time_str) - get_time_as_seconds(time_)) > 3: continue if same_time_nums[time_] > 20: - RedisUtils.setex(l2_data_manager._redisManager.getRedis(), "big_data-{}-{}".format(code, int(round(time.time() * 1000))), tool.get_expire(), + RedisUtils.setex(l2_data_manager._redisManager.getRedis(), + "big_data-{}-{}".format(code, int(round(time.time() * 1000))), tool.get_expire(), d1) break @@ -192,7 +193,7 @@ # 鑾峰彇鏈�鏂版暟鎹潯鏁� def get_l2_latest_data_number(code): - num =RedisUtils.get(l2_data_manager._redisManager.getRedis(), "l2_latest_data_num-{}".format(code)) + num = RedisUtils.get(l2_data_manager._redisManager.getRedis(), "l2_latest_data_num-{}".format(code)) if num is not None: return int(num) return None -- Gitblit v1.8.0