feat: 改造接口
This commit is contained in:
@@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
public class SessionGetListInput
|
public class SessionGetListInput
|
||||||
{
|
{
|
||||||
|
public string? SessionTitle { get; set; }
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
using Mapster;
|
using Mapster;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
using Volo.Abp.Application.Dtos;
|
using Volo.Abp.Application.Dtos;
|
||||||
using Volo.Abp.Application.Services;
|
using Volo.Abp.Application.Services;
|
||||||
@@ -26,7 +27,7 @@ public class MessageService : ApplicationService
|
|||||||
/// <param name="input"></param>
|
/// <param name="input"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[Authorize]
|
[Authorize]
|
||||||
public async Task<PagedResultDto<MessageDto>> GetListAsync(MessageGetListInput input)
|
public async Task<PagedResultDto<MessageDto>> GetListAsync([FromQuery]MessageGetListInput input)
|
||||||
{
|
{
|
||||||
RefAsync<int> total = 0;
|
RefAsync<int> total = 0;
|
||||||
var userId = CurrentUser.GetId();
|
var userId = CurrentUser.GetId();
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using Mapster;
|
using Mapster;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Volo.Abp.Application.Dtos;
|
using Volo.Abp.Application.Dtos;
|
||||||
using Volo.Abp.Application.Services;
|
using Volo.Abp.Application.Services;
|
||||||
using Volo.Abp.Domain.Repositories;
|
using Volo.Abp.Domain.Repositories;
|
||||||
|
|||||||
@@ -4,7 +4,10 @@ using Volo.Abp.Domain.Entities.Auditing;
|
|||||||
namespace Yi.Framework.AiHub.Domain.Entities;
|
namespace Yi.Framework.AiHub.Domain.Entities;
|
||||||
|
|
||||||
[SugarTable("Ai_Message")]
|
[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 class MessageAggregateRoot : FullAuditedAggregateRoot<Guid>
|
||||||
{
|
{
|
||||||
public MessageAggregateRoot()
|
public MessageAggregateRoot()
|
||||||
|
|||||||
Reference in New Issue
Block a user