From 79105c339d70eacd4b72abc6701787e83ecfcbdf Mon Sep 17 00:00:00 2001 From: OpenClaw Agent Date: Mon, 16 Mar 2026 09:08:47 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B9=B0=E5=85=A5=E5=90=8E=E6=8C=81?= =?UTF-8?q?=E4=BB=93=E6=95=B0=E9=87=8F=E5=92=8C=E5=9D=87=E4=BB=B7=E6=AD=A3?= =?UTF-8?q?=E7=A1=AE=E4=BF=9D=E5=AD=98=E5=88=B0=E6=95=B0=E6=8D=AE=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AssetManager.Services/PortfolioService.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AssetManager.Services/PortfolioService.cs b/AssetManager.Services/PortfolioService.cs index 88fa613..1a7110a 100755 --- a/AssetManager.Services/PortfolioService.cs +++ b/AssetManager.Services/PortfolioService.cs @@ -601,10 +601,13 @@ public class PortfolioService : IPortfolioService var newTotalCost = (position.Shares * position.AvgPrice) + ((decimal)request.Amount * (decimal)request.Price); position.AvgPrice = newTotalCost / newTotalShares; position.Shares = newTotalShares; + position.UpdatedAt = DateTime.Now; + _db.Updateable(position).ExecuteCommand(); } else if (request.Type == "sell") { position.Shares -= (decimal)request.Amount; + position.UpdatedAt = DateTime.Now; if (position.Shares <= 0) { _db.Deleteable(position).ExecuteCommand();