diff --git a/AssetManager.Models/DTOs/StrategyDTO.cs b/AssetManager.Models/DTOs/StrategyDTO.cs index bf72fd6..eaabcb0 100755 --- a/AssetManager.Models/DTOs/StrategyDTO.cs +++ b/AssetManager.Models/DTOs/StrategyDTO.cs @@ -130,3 +130,45 @@ public class StrategyListItemDto public DateTime CreatedAt { get; set; } public DateTime UpdatedAt { get; set; } } + +/// +/// 策略信号响应 +/// +public class StrategySignalResponse +{ + /// + /// 信号类型:buy / sell / hold / rebalance + /// + public string? Signal { get; set; } + + /// + /// 信号原因说明 + /// + public string? Reason { get; set; } + + /// + /// 建议操作(可选) + /// + public List? Actions { get; set; } +} + +/// +/// 信号行动建议 +/// +public class SignalAction +{ + /// + /// 股票代码 + /// + public string? Symbol { get; set; } + + /// + /// 行动类型:buy / sell + /// + public string? Action { get; set; } + + /// + /// 目标权重或数量 + /// + public double? Target { get; set; } +} diff --git a/AssetManager.Services/PortfolioFacade.cs b/AssetManager.Services/PortfolioFacade.cs index a0339df..0cfcad1 100644 --- a/AssetManager.Services/PortfolioFacade.cs +++ b/AssetManager.Services/PortfolioFacade.cs @@ -98,14 +98,14 @@ public class PortfolioFacade : IPortfolioFacade var portfolio = _databaseService.GetPortfolioById(portfolioId, userId); if (portfolio == null || string.IsNullOrEmpty(portfolio.StrategyId)) { - return new StrategySignalResponse { signal = "hold", reason = "未绑定策略" }; + return new StrategySignalResponse { Signal = "hold", Reason = "未绑定策略" }; } // 获取策略 var strategy = await _strategyService.GetStrategyByIdAsync(portfolio.StrategyId, userId); if (strategy == null) { - return new StrategySignalResponse { signal = "hold", reason = "策略不存在" }; + return new StrategySignalResponse { Signal = "hold", Reason = "策略不存在" }; } // 计算信号