| | |
| | | |
| | | |
| | | # 读取系统日志 |
| | | def load_huaxin_transaction_map(date=tool.get_now_date_str()): |
| | | def load_huaxin_transaction_map(date=tool.get_now_date_str(), with_time=False): |
| | | path = f"{constant.get_path_prefix()}/logs/huaxin/l2/transaction.{date}.log" |
| | | fdatas = {} |
| | | if os.path.exists(path): |
| | |
| | | try: |
| | | data = line.split(" - ")[1].strip() |
| | | if data.startswith("["): |
| | | time_str = data[data.find("[") + 1:data.find("]")].strip() |
| | | data = data[data.find("]") + 1:].strip() |
| | | |
| | | code = data.split("#")[0] |
| | | l2_data = eval(data.split("#")[1]) |
| | | if code not in fdatas: |
| | | fdatas[code] = [] |
| | | if with_time: |
| | | fdatas[code].append((time_str, l2_data)) |
| | | else: |
| | | fdatas[code].append(l2_data) |
| | | except: |
| | | pass |