- CreateTransaction完成后删除该交易日期之后的净值记录 - 下次请求收益曲线时自动重新计算 - 修改CreateTransaction为async方法 - 注入IPortfolioNavService到PortfolioService 流程: 1. 用户买入/卖出 → 创建交易记录 2. 删除交易日期之后的净值历史 3. 下次请求收益曲线 → 自动回填缺失数据
14 lines
672 B
C#
Executable File
14 lines
672 B
C#
Executable File
using AssetManager.Models.DTOs;
|
|
|
|
namespace AssetManager.Services;
|
|
|
|
public interface IPortfolioService
|
|
{
|
|
CreatePortfolioResponse CreatePortfolio(CreatePortfolioRequest request, string userId);
|
|
List<PortfolioListItem> GetPortfolios(string userId);
|
|
TotalAssetsResponse GetTotalAssets(string userId);
|
|
PortfolioDetailResponse GetPortfolioById(string id, string userId);
|
|
Task<PortfolioDetailResponse> GetPortfolioByIdAsync(string id, string userId);
|
|
GetTransactionsResponse GetTransactions(string portfolioId, string userId, int limit, int offset);
|
|
Task<CreateTransactionResponse> CreateTransaction(CreateTransactionRequest request, string userId);
|
|
} |