feat: 研究Tab加子Tab(📋策略/📈策略进化)——进化子Tab表格展示AB路线每日研究成果(strategy_research_log), 新增/api/research/log
This commit is contained in:
@@ -2237,6 +2237,25 @@ def api_prd():
|
||||
register_routes(app)
|
||||
|
||||
|
||||
@app.route("/api/research/log")
|
||||
def api_research_log():
|
||||
"""AB路线每日研究日志(2026-08-18)"""
|
||||
try:
|
||||
_c = sqlite3.connect(str(DATA_DIR / "mofin.db"), timeout=10)
|
||||
_c.execute("PRAGMA busy_timeout=30000")
|
||||
rows = _c.execute(
|
||||
"SELECT log_date, market, weak_regime, finding, experiment, result, "
|
||||
"produced_strategy, produced_verified FROM strategy_research_log "
|
||||
"ORDER BY log_date DESC LIMIT 50").fetchall()
|
||||
_c.close()
|
||||
log = [{"log_date": r[0], "market": r[1], "weak_regime": r[2], "finding": r[3],
|
||||
"experiment": r[4], "result": r[5], "produced_strategy": r[6],
|
||||
"produced_verified": r[7]} for r in rows]
|
||||
return jsonify({"log": log})
|
||||
except Exception as e:
|
||||
return jsonify({"log": [], "error": str(e)})
|
||||
|
||||
|
||||
@app.route("/api/evolution/dashboard")
|
||||
def api_evolution_dashboard():
|
||||
"""进化模块 Dashboard"""
|
||||
|
||||
Reference in New Issue
Block a user