From 21c96ed504f93f16ce6f8a3ccf164a87c9edd9c0 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期二, 30 一月 2024 15:45:23 +0800
Subject: [PATCH] 增加调试日志

---
 utils/data_export_util.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/utils/data_export_util.py b/utils/data_export_util.py
index 7395f82..9504a2c 100644
--- a/utils/data_export_util.py
+++ b/utils/data_export_util.py
@@ -26,7 +26,9 @@
 # 鑾峰彇L2鐨勬暟鎹�
 def get_l2_datas(code, date=None):
     local_today_datas = log_export.load_l2_from_log(date)
-    datas = local_today_datas[code]
+    datas = local_today_datas.get(code)
+    if not datas:
+        datas = []
     process_indexs = log_export.get_l2_process_position(code, date)
     trade_indexs = log_export.get_l2_trade_position(code, date)
     real_position_indexes = log_export.get_real_place_order_positions(code, date)
@@ -150,7 +152,7 @@
                 try:
                     left_num = data["val"]["num"] - cancel_data["val"]["num"]
                     if left_num > 0:
-                        cancel_info = f"{left_num}鎵嬫湭鎾�:{cancel_data['index']}"
+                        cancel_info = f"鎴愪氦:{left_num} 搴忓彿:{cancel_data['index']}"
                     else:
                         cancel_info = "{}-{}".format(cancel_data["index"], f"{cancel_data['val']['time']}") + (
                             f".{cancel_data['val']['tms']}" if "tms" in cancel_data["val"] else '')

--
Gitblit v1.8.0