feat: mo_data.py unified read layer (DB-first, JSON fallback) + cash_log table + batch JSON→DB migration (16 files)
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
import json, sqlite3
|
||||
from pathlib import Path
|
||||
from datetime import datetime
|
||||
from mo_data import read_portfolio, read_decisions, read_watchlist
|
||||
|
||||
BASE = Path("/home/hmo/MoFin")
|
||||
DATA = BASE / "data"
|
||||
@@ -60,7 +61,7 @@ def main():
|
||||
print(f"holding_strategies: 归档{archived}条过期记录 | 剩余活跃{remaining}条")
|
||||
|
||||
# 2. 检查缺失策略的持仓
|
||||
decisions = json.loads(DECISIONS_PATH.read_text())
|
||||
decisions = mo_data.read_decisions()
|
||||
decisions_list = decisions.get("decisions", [])
|
||||
missing = check_missing_strategies(conn, decisions_list)
|
||||
if missing:
|
||||
|
||||
Reference in New Issue
Block a user