Пример #1
0
 public UpMASearcher(IServiceScopeFactory serviceScopeFactory,
                     string userId, IConfiguration configuration,
                     ILogger logger, ArgUpMA arg) : base(serviceScopeFactory, userId, configuration)
 {
     _logger = logger;
     _arg    = arg;
 }
Пример #2
0
        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());
        }
Пример #3
0
        public IActionResult Get()
        {
            var arg = new ArgUpMA();

            arg.StockIdList = new List <string>()
            {
                "aaaa", "bbbb"
            };

            return(Ok(arg));
        }