From 16db33c161f5dbbb423f2d84199b3f7723e9b2ad Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期四, 17 八月 2023 19:46:17 +0800
Subject: [PATCH] bug修改

---
 log_module/log_analyse.py |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/log_module/log_analyse.py b/log_module/log_analyse.py
index b91c89f..644013b 100644
--- a/log_module/log_analyse.py
+++ b/log_module/log_analyse.py
@@ -42,5 +42,22 @@
     return dict_
 
 
+# 鑾峰彇鍗庨懌鐨勫鎵樻暟鎹�
+def load_huaxin_delegate_datas():
+    file_path = "{}/logs/gp/kpl/kpl_block_can_buy.{}.log".format(constant.get_path_prefix(), tool.get_now_date_str())
+    dict_ = {}
+    if os.path.exists(file_path):
+        with open(file_path, encoding="utf-8") as f:
+            line = f.readline()
+            while line:
+                if True:
+                    code = line.split("code=")[1][:6]
+                    time_ = line.split("|")[0].split(" ")[1][:12]
+                    reason = line.split(f"code={code}锛�")[1].strip()
+                    dict_[code] = (time_, reason.replace("鍙互涓嬪崟", ""))
+                    # print(time_, code, reason)
+                line = f.readline()
+
+
 if __name__ == "__main__":
     print(get_kpl_can_buy_reasons_dict())

--
Gitblit v1.8.0