fix: 修复 CurrentPrice 赋值错误

PortfolioService.cs: CurrentPrice 应该赋值为当前价格,而非今日盈亏
This commit is contained in:
OpenClaw Agent 2026-03-15 13:49:54 +00:00
parent 49b9adfdab
commit 41ff4a2135

View File

@ -349,7 +349,7 @@ public class PortfolioService : IPortfolioService
Symbol = pos.StockCode, Symbol = pos.StockCode,
Amount = (int)pos.Shares, Amount = (int)pos.Shares,
AveragePrice = (double)pos.AvgPrice, AveragePrice = (double)pos.AvgPrice,
CurrentPrice = (double)TodayProfit, CurrentPrice = (double)CurrentPrice,
TotalValue = (double)positionValueInTarget, TotalValue = (double)positionValueInTarget,
Profit = (double)(positionValueInTarget - costInTarget), Profit = (double)(positionValueInTarget - costInTarget),
ProfitRate = ProfitRate, ProfitRate = ProfitRate,