From 444ba4971a474fa9f95d9b29eeb0ee602945ba2e Mon Sep 17 00:00:00 2001 From: zhangxiaofeng <1939543722@qq.com> Date: Tue, 18 Jun 2024 10:18:14 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E4=BC=A0=E6=9C=BA=E5=88=B6bug?= =?UTF-8?q?=E8=B0=83=E6=95=B4=EF=BC=9A=E6=B7=BB=E5=8A=A0=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E8=BF=87=E6=BB=A4=EF=BC=8C=E5=8F=AA=E8=A1=A5?= =?UTF-8?q?=E4=BC=A02=E5=88=86=E9=92=9F=E5=86=85=E6=9C=AA=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E7=9A=84=E5=8D=95=E5=AD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/OrderController.cs | 24 ++++++++++--------- .../QuartzNet/Jobs/JobHydSubmitQuartz.cs | 3 ++- 2 files changed, 15 insertions(+), 12 deletions(-) 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"]);