diff --git a/EntrustSettle.Api/Controllers/OrderController.cs b/EntrustSettle.Api/Controllers/OrderController.cs index 490cad4..b247b11 100644 --- a/EntrustSettle.Api/Controllers/OrderController.cs +++ b/EntrustSettle.Api/Controllers/OrderController.cs @@ -124,19 +124,21 @@ namespace EntrustSettle.Api.Controllers //[ApiUser(ApiCode = "OrderSubmit")] public async Task Test() { - CustFee custFeeModel = new CustFee() - { - SENDTYPE = 0, - SENDTIME = DateTime.Now, - CtnrInfo = string.Empty, - CtnrCount = 0, - GID = Guid.NewGuid().ToString(), - }; - string msg = "123"; - logger.LogInformation($"{msg},扣费记录内容:{{custFeeModel}}", custFeeModel.ToJson()); + // 查询所有待处理订单列表 + var pendingOrderList = await orderService.QueryTop(x => x.IsSend == false && x.CreateTime < DateTime.Now.AddMinutes(-2), 10, "Id asc"); + //CustFee custFeeModel = new CustFee() + //{ + // SENDTYPE = 0, + // SENDTIME = DateTime.Now, + // CtnrInfo = string.Empty, + // CtnrCount = 0, + // GID = Guid.NewGuid().ToString(), + //}; + //string msg = "123"; + //logger.LogInformation($"{msg},扣费记录内容:{{custFeeModel}}", custFeeModel.ToJson()); var a = App.User.Name; var b = App.User.ID; - await Task.CompletedTask; + //await Task.CompletedTask; var c = new { a, b }; return Success(c); } diff --git a/EntrustSettle.Tasks/QuartzNet/Jobs/JobHydSubmitQuartz.cs b/EntrustSettle.Tasks/QuartzNet/Jobs/JobHydSubmitQuartz.cs index fb1d2f7..b965386 100644 --- a/EntrustSettle.Tasks/QuartzNet/Jobs/JobHydSubmitQuartz.cs +++ b/EntrustSettle.Tasks/QuartzNet/Jobs/JobHydSubmitQuartz.cs @@ -55,12 +55,13 @@ namespace EntrustSettle.Tasks // 查询所有待处理订单列表 - var pendingOrderList = await orderService.QueryTop(x => x.IsSend == false, 50, "Id desc"); + var pendingOrderList = await orderService.QueryTop(x => x.IsSend == false && x.CreateTime < DateTime.Now.AddMinutes(-2), 20, "Id asc"); if (pendingOrderList.Count == 0) { return; } + _logger.LogInformation($"查询到{pendingOrderList.Count}条待自动提交的订单,{string.Join("、", pendingOrderList.Select(x => x.Mblno))}"); string domainUrl = AppSettings.app(["Startup", "Domain"]);