MeiRiYiCheng_1_old/YBDevice.Application/Logger/NoticeLoggerAppService.cs

51 lines
1.6 KiB
C#
Raw Permalink Normal View History

2025-07-16 17:14:38 +08:00
using Furion.DynamicApiController;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Nirvana.Common;
using Nirvana.Common.ApiBase;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YBDevice.Entity;
namespace YBDevice.Application.Logger
{
/// <summary>
/// 日志管理
/// </summary>
[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)]
public class NoticeLoggerAppService : IDynamicApiController
{
private readonly INoticeLoggerService _noticeLoggerService;
public NoticeLoggerAppService(INoticeLoggerService noticeLoggerService)
{
_noticeLoggerService = noticeLoggerService;
}
/// <summary>
/// 通知日志
/// </summary>
/// <param name="param"></param>
/// <returns></returns>
[HttpPost]
public async Task<ResultInfo> GetListAsync(QueryParams param)
{
var result = await _noticeLoggerService.GetListAsync(param);
return new ResultInfo(ResultState.SUCCESS, "success", result);
}
/// <summary>
/// 操作日志列表
/// </summary>
/// <param name="param"></param>
/// <returns></returns>
[HttpPost]
public async Task<ResultInfo> GetAuditListAsync(QueryParams param)
{
var result = await _noticeLoggerService.GetAuditListAsync(param);
return new ResultInfo(ResultState.SUCCESS, "success", result);
}
}
}