feat: 完成用量统计功能模块

This commit is contained in:
ccnetcore
2025-06-27 22:13:26 +08:00
parent 96e275efa6
commit 01a3c81359
20 changed files with 281 additions and 98 deletions

View File

@@ -7,6 +7,7 @@ using Volo.Abp.Application.Services;
using Volo.Abp.Users;
using Yi.Framework.AiHub.Application.Contracts.Dtos;
using Yi.Framework.AiHub.Domain.Entities;
using Yi.Framework.AiHub.Domain.Entities.Chat;
using Yi.Framework.SqlSugarCore.Abstractions;
namespace Yi.Framework.AiHub.Application.Services;
@@ -34,7 +35,7 @@ public class MessageService : ApplicationService
var entities = await _repository._DbQueryable
.Where(x => x.SessionId == input.SessionId)
.Where(x=>x.UserId == userId)
.OrderByDescending(x => x.Id)
.OrderBy(x => x.Id)
.ToPageListAsync(input.SkipCount, input.MaxResultCount, total);
return new PagedResultDto<MessageDto>(total, entities.Adapt<List<MessageDto>>());
}