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

master
zhangxiaofeng 5 months ago
parent 37ee0fafa6
commit 444ba4971a

@ -124,19 +124,21 @@ namespace EntrustSettle.Api.Controllers
//[ApiUser(ApiCode = "OrderSubmit")]
public async Task<dynamic> 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);
}

@ -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"]);

Loading…
Cancel
Save