feat: 改造接口

This commit is contained in:
ccnetcore
2025-06-21 13:15:14 +08:00
parent ac04e846fa
commit 25c88187a3
4 changed files with 8 additions and 3 deletions

View File

@@ -2,5 +2,5 @@
public class SessionGetListInput
{
public string? SessionTitle { get; set; }
}

View File

@@ -1,5 +1,6 @@
using Mapster;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
@@ -26,7 +27,7 @@ public class MessageService : ApplicationService
/// <param name="input"></param>
/// <returns></returns>
[Authorize]
public async Task<PagedResultDto<MessageDto>> GetListAsync(MessageGetListInput input)
public async Task<PagedResultDto<MessageDto>> GetListAsync([FromQuery]MessageGetListInput input)
{
RefAsync<int> total = 0;
var userId = CurrentUser.GetId();

View File

@@ -1,5 +1,6 @@
using Mapster;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Repositories;

View File

@@ -4,7 +4,10 @@ using Volo.Abp.Domain.Entities.Auditing;
namespace Yi.Framework.AiHub.Domain.Entities;
[SugarTable("Ai_Message")]
[SugarIndex($"index_{{table}}_{nameof(UserId)}", $"{nameof(UserId)}", OrderByType.Asc)]
[SugarIndex($"index_{{table}}_{nameof(UserId)}_{nameof(SessionId)}",
$"{nameof(UserId)}", OrderByType.Desc,
$"{nameof(SessionId)}", OrderByType.Desc
)]
public class MessageAggregateRoot : FullAuditedAggregateRoot<Guid>
{
public MessageAggregateRoot()