39 lines
1.0 KiB
C#
39 lines
1.0 KiB
C#
|
|
using LangGuan.Command.Model;
|
|||
|
|
using LangGuan.Services;
|
|||
|
|
using Microsoft.AspNetCore.Http;
|
|||
|
|
using Microsoft.AspNetCore.Mvc;
|
|||
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Linq;
|
|||
|
|
using System.Threading.Tasks;
|
|||
|
|
|
|||
|
|
namespace LangGuan.Controllers
|
|||
|
|
{
|
|||
|
|
[ApiVersion("1.0")]
|
|||
|
|
[Route("api/[controller]/v{version:apiVersion}")]
|
|||
|
|
[ApiController]
|
|||
|
|
public class AlertController : ControllerBase
|
|||
|
|
{
|
|||
|
|
private AlertService _alertService;
|
|||
|
|
/// <summary>
|
|||
|
|
///
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="alertService"></param>
|
|||
|
|
public AlertController(AlertService alertService)
|
|||
|
|
{
|
|||
|
|
_alertService = alertService;
|
|||
|
|
}
|
|||
|
|
/// <summary>
|
|||
|
|
/// 列表
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="request"></param>
|
|||
|
|
/// <returns></returns>
|
|||
|
|
[HttpGet("list")]
|
|||
|
|
public async Task<IActionResult> list([FromQuery] RqeustPaging request)
|
|||
|
|
{
|
|||
|
|
var result = await _alertService.GetList(request);
|
|||
|
|
return Ok(result);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|