|
|
|
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.SecurityLogs;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 安全日志
|
|
|
|
/// </summary>
|
|
|
|
[RemoteService(Name = AuditingRemoteServiceConsts.RemoteServiceName)]
|
|
|
|
[Area("auditing")]
|
|
|
|
[Route("api/auditing/security-log")]
|
|
|
|
public class SecurityLogController : AbpController, ISecurityLogAppService
|
|
|
|
{
|
|
|
|
protected ISecurityLogAppService SecurityLogAppService { get; }
|
|
|
|
|
|
|
|
public SecurityLogController(ISecurityLogAppService securityLogAppService)
|
|
|
|
{
|
|
|
|
SecurityLogAppService = securityLogAppService;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 根据Id获取
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="id"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpGet]
|
|
|
|
[Route("{id}")]
|
|
|
|
public virtual Task<SecurityLogDto> GetAsync(Guid id)
|
|
|
|
{
|
|
|
|
return SecurityLogAppService.GetAsync(id);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 分页获取
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="input"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpGet]
|
|
|
|
public virtual Task<PagedResultDto<SecurityLogDto>> GetListAsync(SecurityLogGetByPagedDto input)
|
|
|
|
{
|
|
|
|
return SecurityLogAppService.GetListAsync(input);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 根据Id删除
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="id"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpDelete]
|
|
|
|
[Route("{id}")]
|
|
|
|
public virtual Task DeleteAsync(Guid id)
|
|
|
|
{
|
|
|
|
return SecurityLogAppService.DeleteAsync(id);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|