From d873f18025970f81d5ad93d9ba948ff4747a1964 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期三, 12 六月 2024 10:45:28 +0800
Subject: [PATCH] bug修复

---
 log_module/log_export.py |   24 +++++++++++++++++++++++-
 1 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/log_module/log_export.py b/log_module/log_export.py
index 1e51e68..4d9f962 100644
--- a/log_module/log_export.py
+++ b/log_module/log_export.py
@@ -109,7 +109,7 @@
         lines = file.readlines()
         for line in lines:
             start_index = line.find("]")
-            if start_index<0:
+            if start_index < 0:
                 continue
             line = line[start_index + 1:].strip()
             data = eval(line)
@@ -117,6 +117,28 @@
     return fdatas
 
 
+def load_big_buy_order(date=tool.get_now_date_str()):
+    """
+    鑾峰彇澶т拱鍗�
+    :param date:
+    :return:
+    """
+    path = f"{constant.get_path_prefix()}/{constant.LOG_DIR}/huaxin/l2/transaction_big_buy.{date}.log"
+    fdatas = {}
+    with open(path, 'r') as file:
+        lines = file.readlines()
+        for line in lines:
+            start_index = line.find("]")
+            if start_index < 0:
+                continue
+            line = line[start_index + 1:].strip()
+            ds = line.split("#")
+            code = ds[0].strip()
+            data = eval(ds[1])
+            if code not in fdatas:
+                fdatas[code] = []
+            fdatas[code].append(data)
+    return fdatas
 
 
 if __name__ == "__main__":

--
Gitblit v1.8.0