api不能自动注入条件的解决方法

加上这个属性 [ApiController]

   [Area("DepartmentStoreAPI")]
    [AuthorizeJwt]
    [ActionDescription("PurchaseOrder")]
    [ApiController]
    [Route("api/PurchaseOrder")]
    public class PurchaseOrderController : BaseApiController
    {
        [ActionDescription("GetChildListWithCodes")]
        [HttpPost("GetChildListWithCodes")]
        [Public]
        public IActionResult GetChildListWithCodes(List<PurchaseOrderDetailFilterMulite> filters)
        {
            var logic = new TS_DataBridgeAPISelenium.SystemForDepartmentStoreLogic();
            var lstResult = logic.GetPurchaseOrderDetail(filters);
            return Content(Newtonsoft.Json.JsonConvert.SerializeObject(new { TotalCount = lstResult.Count, Data = lstResult }));
        }

    }

 

posted @ 2020-12-18 00:01  星星c#  阅读(172)  评论(0编辑  收藏  举报