feat: 完成个个模型ai统计

This commit is contained in:
ccnetcore
2025-06-27 22:21:44 +08:00
parent 01a3c81359
commit 2b07061c18
3 changed files with 5 additions and 4 deletions

View File

@@ -8,8 +8,6 @@ public class MessageDto : FullAuditedEntityDto<Guid>
public Guid SessionId { get; set; }
public string Content { get; set; }
public string Role { get; set; }
public decimal DeductCost { get; set; }
public decimal TotalTokens { get; set; }
public string ModelId { get; set; }
public string Remark { get; set; }
}

View File

@@ -39,8 +39,6 @@ public class MessageAggregateRoot : FullAuditedAggregateRoot<Guid>
public string Content { get; set; }
public string Role { get; set; }
public decimal DeductCost { get; set; }
public decimal TotalTokens { get; set; }
public string ModelId { get; set; }
public string? Remark { get; set; }

View File

@@ -7,6 +7,11 @@ public class UsageStatisticsManager : DomainService
{
private readonly ISqlSugarRepository<UsageStatisticsAggregateRoot> _repository;
public UsageStatisticsManager(ISqlSugarRepository<UsageStatisticsAggregateRoot> repository)
{
_repository = repository;
}
private IDistributedLockProvider DistributedLock =>
LazyServiceProvider.LazyGetRequiredService<IDistributedLockProvider>();