Initial_commit_SecMPS_v2
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
*接口编写处...
|
||||
*如果接口需要做Action的权限验证,请在Action上使用属性
|
||||
*如: [ApiActionPermission("warehouse_carvisitor",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_carvisitorController
|
||||
{
|
||||
private readonly Iwarehouse_carvisitorService _service;//访问业务代码
|
||||
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||
|
||||
[ActivatorUtilitiesConstructor]
|
||||
public warehouse_carvisitorController(
|
||||
Iwarehouse_carvisitorService service,
|
||||
IHttpContextAccessor httpContextAccessor
|
||||
)
|
||||
: base(service)
|
||||
{
|
||||
_service = service;
|
||||
_httpContextAccessor = httpContextAccessor;
|
||||
}
|
||||
|
||||
[Route("GetCarNumber"), HttpGet]
|
||||
[AllowAnonymous]
|
||||
public int GetCarNumber()
|
||||
{
|
||||
return _service.GetCarNumber();
|
||||
}
|
||||
|
||||
[Route("GetCarList"), HttpGet]
|
||||
[AllowAnonymous]
|
||||
public List<warehouse_carvisitor> GetCarList()
|
||||
{
|
||||
return _service.GetCarList();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user