补传机制bug调整:添加创建时间过滤,只补传2分钟内未上传的单子

master
zhangxiaofeng 5 months ago
parent 37ee0fafa6
commit 444ba4971a

@ -124,19 +124,21 @@ namespace EntrustSettle.Api.Controllers
//[ApiUser(ApiCode = "OrderSubmit")] //[ApiUser(ApiCode = "OrderSubmit")]
public async Task<dynamic> Test() public async Task<dynamic> Test()
{ {
CustFee custFeeModel = new CustFee() // 查询所有待处理订单列表
{ var pendingOrderList = await orderService.QueryTop(x => x.IsSend == false && x.CreateTime < DateTime.Now.AddMinutes(-2), 10, "Id asc");
SENDTYPE = 0, //CustFee custFeeModel = new CustFee()
SENDTIME = DateTime.Now, //{
CtnrInfo = string.Empty, // SENDTYPE = 0,
CtnrCount = 0, // SENDTIME = DateTime.Now,
GID = Guid.NewGuid().ToString(), // CtnrInfo = string.Empty,
}; // CtnrCount = 0,
string msg = "123"; // GID = Guid.NewGuid().ToString(),
logger.LogInformation($"{msg},扣费记录内容:{{custFeeModel}}", custFeeModel.ToJson()); //};
//string msg = "123";
//logger.LogInformation($"{msg},扣费记录内容:{{custFeeModel}}", custFeeModel.ToJson());
var a = App.User.Name; var a = App.User.Name;
var b = App.User.ID; var b = App.User.ID;
await Task.CompletedTask; //await Task.CompletedTask;
var c = new { a, b }; var c = new { a, b };
return Success(c); return Success(c);
} }

@ -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) if (pendingOrderList.Count == 0)
{ {
return; return;
} }
_logger.LogInformation($"查询到{pendingOrderList.Count}条待自动提交的订单,{string.Join("", pendingOrderList.Select(x => x.Mblno))}");
string domainUrl = AppSettings.app(["Startup", "Domain"]); string domainUrl = AppSettings.app(["Startup", "Domain"]);

Loading…
Cancel
Save