From eaef1b8994cd7c3f170e56e2bdf4c0dd45f603e1 Mon Sep 17 00:00:00 2001
From: admin <admin@example.com>
Date: 星期三, 28 五月 2025 13:31:09 +0800
Subject: [PATCH] 修复 当前有意购买统计的 BUG

---
 log_module/log_export.py    |    3 ++-
 strategy/buying_strategy.py |    5 ++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/log_module/log_export.py b/log_module/log_export.py
index 7209d36..70eb7fd 100644
--- a/log_module/log_export.py
+++ b/log_module/log_export.py
@@ -52,7 +52,7 @@
     __log_file_contents[md5] = (time.time(), contents)
     return contents
 
-
+# 鍔犺浇鏉垮潡寮哄害鏃ュ織
 def load_market_sift_plate(date=tool.get_now_date_str()):
     """
      鑾峰彇绮鹃�夋祦鍏ョ殑鎴愬垎鑲�
@@ -76,6 +76,7 @@
     return fdatas
 
 
+# 鍔犺浇涓偂寮哄害鏃ュ織
 def load_kpl_market_stock_heat(date=tool.get_now_date_str()):
     """
      鑾峰彇绮鹃�夋祦鍏ョ殑鎴愬垎鑲�
diff --git a/strategy/buying_strategy.py b/strategy/buying_strategy.py
index efa5979..004f81b 100644
--- a/strategy/buying_strategy.py
+++ b/strategy/buying_strategy.py
@@ -384,8 +384,11 @@
                                             logger_info(
                                                 f"銆愪笉鍒┿�戝綋鏃ユ垚浜ら噺灏忎簬鏄ㄦ棩鎴愪氦閲忕殑{ratios}鍊嶏紒涓嶄拱锛侊紒鍏徃鍚嶇О锛歿k_line_data[0]['sec_name']}锛屽綋鏃ュ綋鏃舵�绘垚浜ら噺:{current_volume},鏈�鏂颁环: {current_price}")
                                             return
-                                        data_cache.willing_buy_list.add_buy_code(k_line_data[0]['sec_name'])
+                                        data_cache.willing_buy_list.append(k_line_data[0]['sec_name'])
                                         logger_info(f"褰撳墠鏈夋剰璐拱锛歿k_line_data[0]['sec_name']}锛屾湁鎰忚喘涔板垪琛細{data_cache.willing_buy_list}")
+                                        if data_cache.have_plate_buy_times >= 1 and k_line_data[0]['sec_name'] not in data_cache.willing_buy_list:
+                                            logger_info(
+                                                f"銆� beneficial銆戞湁姒傚康涔板叆宸茬粡 1 娆�,涓旀湭鏇捐繘鍏ヨ繃鏈夋剰璐拱鍒楄〃锛佷笉涔颁簡锛侊紒鍏徃鍚嶇О锛歿k_line_data[0]['sec_name']}锛�")
                                         if len(intersection_plate) > 0:
                                             logger_info(
                                                 f"銆愪笉鍒┿�戝悓姒傚康鍙拱涓�娆★紝涓嶄拱浜嗭紝鍏徃鍚嶇О锛歿k_line_data[0]['sec_name']}锛岄噸澶嶇浉浜ゆ蹇�==={intersection_plate}")

--
Gitblit v1.8.0