From e781f7fe47c2c4330bc4c7ad4dd63c15b08a93e3 Mon Sep 17 00:00:00 2001 From: xxm Date: Tue, 25 Aug 2026 14:08:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BB=B7=E6=A0=BC=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=90=8E=E5=90=8C=E6=AD=A5=E9=87=8D=E7=AE=97market=5Fvalue(?= =?UTF-8?q?=E7=9F=A5=E5=BE=AE11:56=E4=BF=AE=E5=A4=8D,=E4=B8=A4=E6=AC=A1?= =?UTF-8?q?=E8=A2=ABdeploy=5Fguard=E5=9B=9E=E6=BB=9A,=E4=BB=A3=E4=B8=BA?= =?UTF-8?q?=E5=85=A5=E5=BA=93)=E2=80=94=E2=80=94=E6=8C=81=E4=BB=93?= =?UTF-8?q?=E5=B8=82=E5=80=BC=E6=BC=82=E7=A7=BB=E6=A0=B9=E6=B2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/profile-scripts/price_monitor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/deploy/profile-scripts/price_monitor.py b/deploy/profile-scripts/price_monitor.py index 5eb44b09..a9105ff6 100644 --- a/deploy/profile-scripts/price_monitor.py +++ b/deploy/profile-scripts/price_monitor.py @@ -463,6 +463,9 @@ def refresh_data_prices(): if price_val > 0: h['price'] = round(price_val, 2) h['change_pct'] = float(change_pct) if change_pct else 0 + # 重新计算 market_value 保持与 price 同步 + shares = h.get('shares', 0) + h['market_value'] = round(price_val * shares, 2) db_holdings.append(h) # ── 写 holdings 表 ──