42 lines
1.2 KiB
C#
42 lines
1.2 KiB
C#
/*
|
|
*接口编写处...
|
|
*如果接口需要做Action的权限验证,请在Action上使用属性
|
|
*如: [ApiActionPermission("Warehouse_Alert",Enums.ActionPermissionOptions.Search)]
|
|
*/
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using VolPro.Entity.DomainModels;
|
|
using Warehouse.IServices;
|
|
|
|
namespace Warehouse.Controllers
|
|
{
|
|
public partial class Warehouse_AlertController
|
|
{
|
|
private readonly IWarehouse_AlertService _service;//访问业务代码
|
|
private readonly IHttpContextAccessor _httpContextAccessor;
|
|
|
|
[ActivatorUtilitiesConstructor]
|
|
public Warehouse_AlertController(
|
|
IWarehouse_AlertService service,
|
|
IHttpContextAccessor httpContextAccessor
|
|
)
|
|
: base(service)
|
|
{
|
|
_service = service;
|
|
_httpContextAccessor = httpContextAccessor;
|
|
}
|
|
|
|
[Route("GetAlertList"), HttpGet]
|
|
[AllowAnonymous]
|
|
public List<Warehouse_Alert> GetAlertList()
|
|
{
|
|
return _service.GetAlertList();
|
|
}
|
|
}
|
|
}
|