Commit bfee41b2 by 泽锋 李

fix

parent 7a292a7c
......@@ -51,7 +51,14 @@ namespace ResetOutofstock
report_cash_flow_dao.CalculationOrderCostLogistics(now.AddMonths(-3), DateTime.Parse(now.AddDays(-1).ToString("yyyy-MM-dd 23:59:59")));
Console.WriteLine($"结束 刷新订单尾程费 退款数据,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
}
if (now.Hour == 9 && now.Minute == 01)
{
Console.WriteLine($"开始刷新 现金流 sku 报表 数据,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
report.ResetCashFlowData();
Console.WriteLine($"结束刷新 现金流 sku 报表 ,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
}
}
public override void Dispose()
......
......@@ -23,7 +23,7 @@ namespace ResetOutofstock
// throw;
//}
report.ResetCashFlowData();
var builder = new HostBuilder().ConfigureServices((hostContext, services) =>
......
......@@ -141,25 +141,6 @@ namespace ResetOutofstock
}
});
Task.Factory.StartNew(() =>
{
while (true)
{
try
{
Console.WriteLine($"开始刷新 现金流 sku 报表 数据,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
report.ResetCashFlowData();
Console.WriteLine($"结束刷新 现金流 sku 报表 ,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
Thread.Sleep(120 * 60 * 1000);
}
});
return Task.CompletedTask;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment