public UpMASearcher(IServiceScopeFactory serviceScopeFactory, string userId, IConfiguration configuration, ILogger logger, ArgUpMA arg) : base(serviceScopeFactory, userId, configuration) { _logger = logger; _arg = arg; }
public ActionResult UpMA([FromBody] ArgUpMA model) { var userId = HttpContext.User.Identity.Name; var searcher = new UpMASearcher(_serviceScopeFactory, userId, _configuration, _logger, model); //开启新的线程来执行任务 Task.Run(async() => await searcher.Search()); return(NoContent()); }
public IActionResult Get() { var arg = new ArgUpMA(); arg.StockIdList = new List <string>() { "aaaa", "bbbb" }; return(Ok(arg)); }