From 719f2cc325802b3362d49a44547af81fb38eeaad Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期二, 07 一月 2025 10:55:34 +0800
Subject: [PATCH] BUG修复

---
 third_data/history_k_data_util.py |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/third_data/history_k_data_util.py b/third_data/history_k_data_util.py
index f74c66f..aada0ae 100644
--- a/third_data/history_k_data_util.py
+++ b/third_data/history_k_data_util.py
@@ -234,10 +234,13 @@
     @classmethod
     def get_history_tick_n(cls, code, count, fields=None):
         # return JueJinApi.get_history_tick_n(code, count, fields)
-        try:
-            return hx_qc_value_util.get_history_k_bars(code, count)
-        except Exception as e:
-            logger_debug.exception(e)
+        if constant.is_windows():
+            return JueJinApi.get_history_tick_n(code, count, fields)
+        else:
+            try:
+                return hx_qc_value_util.get_history_k_bars(code, count)
+            except Exception as e:
+                logger_debug.exception(e)
 
 
     @classmethod
@@ -247,7 +250,10 @@
     # 杩斿洖鎸囧畾鏃ユ湡鐨勪笂涓氦鏄撴棩
     @classmethod
     def get_previous_trading_date(cls, date):
-        return hx_qc_value_util.get_previous_trading_date(date)
+        if constant.is_windows():
+            return JueJinApi.get_previous_trading_date(date)
+        else:
+            return hx_qc_value_util.get_previous_trading_date(date)
 
     @classmethod
     def get_previous_trading_date_cache(cls, date):

--
Gitblit v1.8.0