|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
using System;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using Volo.Abp;
|
|
|
|
using Volo.Abp.Application.Dtos;
|
|
|
|
using Volo.Abp.AspNetCore.Mvc;
|
|
|
|
|
|
|
|
namespace Sanhe.Abp.Auditing.AuditLogs;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 实体变更
|
|
|
|
/// </summary>
|
|
|
|
[RemoteService(Name = AuditingRemoteServiceConsts.RemoteServiceName)]
|
|
|
|
[Area("auditing")]
|
|
|
|
[Route("api/auditing/entity-changes")]
|
|
|
|
public class EntityChangesController : AbpControllerBase, IEntityChangesAppService
|
|
|
|
{
|
|
|
|
protected IEntityChangesAppService EntityChangeAppService { get; }
|
|
|
|
|
|
|
|
public EntityChangesController(IEntityChangesAppService entityChangeAppService)
|
|
|
|
{
|
|
|
|
EntityChangeAppService = entityChangeAppService;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 根据Id获取
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="id"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpGet]
|
|
|
|
[Route("{id}")]
|
|
|
|
public Task<EntityChangeDto> GetAsync(Guid id)
|
|
|
|
{
|
|
|
|
return EntityChangeAppService.GetAsync(id);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 分页获取
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="input"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpGet]
|
|
|
|
public Task<PagedResultDto<EntityChangeDto>> GetListAsync(EntityChangeGetByPagedDto input)
|
|
|
|
{
|
|
|
|
return EntityChangeAppService.GetListAsync(input);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 根据Id获取并带用户名
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="id"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpGet]
|
|
|
|
[Route("with-username/{id}")]
|
|
|
|
public Task<EntityChangeWithUsernameDto> GetWithUsernameAsync(Guid id)
|
|
|
|
{
|
|
|
|
return EntityChangeAppService.GetWithUsernameAsync(id);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 根据实体Id与完全类名称获取并带用户名
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="input"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpGet]
|
|
|
|
[Route("with-username")]
|
|
|
|
public Task<ListResultDto<EntityChangeWithUsernameDto>> GetWithUsernameAsync(EntityChangeGetWithUsernameDto input)
|
|
|
|
{
|
|
|
|
return EntityChangeAppService.GetWithUsernameAsync(input);
|
|
|
|
}
|
|
|
|
}
|