/* *接口编写处... *如果接口需要做Action的权限验证,请在Action上使用属性 *如: [ApiActionPermission("warehouse_safenotify",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_safenotifyController { private readonly Iwarehouse_safenotifyService _service;//访问业务代码 private readonly IHttpContextAccessor _httpContextAccessor; [ActivatorUtilitiesConstructor] public warehouse_safenotifyController( Iwarehouse_safenotifyService service, IHttpContextAccessor httpContextAccessor ) : base(service) { _service = service; _httpContextAccessor = httpContextAccessor; } [Route("GetLastNotify"), HttpGet] [AllowAnonymous] public warehouse_safenotify GetLastNotify() { return Service.GetLastNotify(); } } }