You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.7 KiB
62 lines
1.7 KiB
3 years ago
|
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")]
|
||
|
[ControllerName("audit-log")]
|
||
|
[Route("api/auditing/audit-log")]
|
||
|
public class AuditLogController : AbpController, IAuditLogAppService
|
||
|
{
|
||
|
protected IAuditLogAppService AuditLogAppService { get; }
|
||
|
|
||
|
public AuditLogController(IAuditLogAppService auditLogAppService)
|
||
|
{
|
||
|
AuditLogAppService = auditLogAppService;
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 根据Id获取
|
||
|
/// </summary>
|
||
|
/// <param name="id"></param>
|
||
|
/// <returns></returns>
|
||
|
[HttpGet]
|
||
|
[Route("{id}")]
|
||
|
public virtual Task<AuditLogDto> GetAsync(Guid id)
|
||
|
{
|
||
|
return AuditLogAppService.GetAsync(id);
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 分页获取
|
||
|
/// </summary>
|
||
|
/// <param name="input"></param>
|
||
|
/// <returns></returns>
|
||
|
[HttpGet]
|
||
|
public virtual Task<PagedResultDto<AuditLogDto>> GetListAsync(AuditLogGetByPagedDto input)
|
||
|
{
|
||
|
return AuditLogAppService.GetListAsync(input);
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 根据Id删除
|
||
|
/// </summary>
|
||
|
/// <param name="id"></param>
|
||
|
/// <returns></returns>
|
||
|
[HttpDelete]
|
||
|
[Route("{id}")]
|
||
|
public virtual Task DeleteAsync(Guid id)
|
||
|
{
|
||
|
return AuditLogAppService.DeleteAsync(id);
|
||
|
}
|
||
|
}
|
||
|
}
|