From 394ff09003f702e0827f2b30cb3860552e2268a9 Mon Sep 17 00:00:00 2001 From: xxm Date: Mon, 17 Aug 2026 17:33:25 +0800 Subject: [PATCH] =?UTF-8?q?feat:=204=E7=8E=AF=E8=8A=82=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E4=BE=9D=E6=8D=AE=E7=AD=96=E7=95=A5(source=5Fstrategy=E8=B4=AF?= =?UTF-8?q?=E7=A9=BF=E5=80=99=E9=80=89=E2=86=92=E6=8F=90=E6=8B=94=E2=86=92?= =?UTF-8?q?=E9=87=8D=E8=AF=84=E5=BF=AB=E7=85=A7)=20-=20candidates+source?= =?UTF-8?q?=5Fstrategy,=204scanner=20INSERT=E5=86=99=E7=AD=96=E7=95=A5?= =?UTF-8?q?=E5=90=8D(ON=20CONFLICT=E5=90=8C=E6=AD=A5)=20-=20promote?= =?UTF-8?q?=E8=AF=BBc.source=5Fstrategy=E2=86=92holding.strategy=5Fname=20?= =?UTF-8?q?-=20snapshot=5Fstrategy=5Fhistory=E7=BB=A7=E6=89=BFstrategy=5Fn?= =?UTF-8?q?ame=E5=86=99history=20-=20=E5=8E=86=E5=8F=B2=E5=9B=9E=E5=A1=AB4?= =?UTF-8?q?47=E5=8F=AA=E5=80=99=E9=80=89+18=E5=8F=AA=E8=87=AA=E9=80=89+8?= =?UTF-8?q?=E5=8F=AAholding?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/profile-scripts/mofin_db.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy/profile-scripts/mofin_db.py b/deploy/profile-scripts/mofin_db.py index 8498e8d2..effefd33 100644 --- a/deploy/profile-scripts/mofin_db.py +++ b/deploy/profile-scripts/mofin_db.py @@ -1960,7 +1960,7 @@ def snapshot_strategy_history(conn, code: str, source_trigger: str = "write_hold row = conn.execute( "SELECT code, name, decision_type, strategy_type, full_analysis, " "action, timing_signal, entry_low, entry_high, stop_loss, take_profit, " - "position_advice, rr_ratio, version, reassessed_at " + "position_advice, rr_ratio, version, strategy_name, reassessed_at " "FROM holding_strategies WHERE code=? AND status='active'", (code,) ).fetchone() @@ -1971,14 +1971,14 @@ def snapshot_strategy_history(conn, code: str, source_trigger: str = "write_hold INSERT INTO strategy_history (code, name, decision_type, strategy_type, full_analysis, action, timing_signal, entry_low, entry_high, stop_loss, take_profit, - position_advice, rr_ratio, version, source_trigger, reassessed_at, snapshotted_at) - VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) + position_advice, rr_ratio, version, strategy_name, source_trigger, reassessed_at, snapshotted_at) + VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) """, ( row[0], row[1], row[2], row[3], row[4], row[5], row[6], row[7], row[8], row[9], row[10], row[11], row[12], row[13], - source_trigger, row[14], now + row[14], source_trigger, row[15], now )) conn.commit() # 每只股票只保留最近20条历史