Commit 677e2a9c by lizefeng

fix

parent ebe7d652
...@@ -208,7 +208,7 @@ namespace AutoTurnOver.Services ...@@ -208,7 +208,7 @@ namespace AutoTurnOver.Services
} }
else else
{ {
new_task_synchro_log.start_time = new DateTime(2023, 1, 1); new_task_synchro_log.start_time = DateTime.Now.AddDays(-88);
} }
new_task_synchro_log.id = MyMySqlConnection._connection.Insert(new_task_synchro_log) ?? 0; new_task_synchro_log.id = MyMySqlConnection._connection.Insert(new_task_synchro_log) ?? 0;
...@@ -672,13 +672,22 @@ namespace AutoTurnOver.Services ...@@ -672,13 +672,22 @@ namespace AutoTurnOver.Services
default: return type_en; default: return type_en;
} }
} }
public void AnaFbaShipmentReport() public void AnaFbaShipmentReport(int status = 0, string data_id = "")
{ {
var reportTypeEnum = ReportTypes.GET_AMAZON_FULFILLED_SHIPMENTS_DATA_GENERAL; var reportTypeEnum = ReportTypes.GET_AMAZON_FULFILLED_SHIPMENTS_DATA_GENERAL;
var ana_task = MyMySqlConnection._connection.QueryFirstOrDefault<dc_base_amazon_fee_report_log>(" select * from dc_base_amazon_fee_report_log where report_type=@report_type and ana_status=0 order by id desc limit 1 ", new var ana_task = MyMySqlConnection._connection.QueryFirstOrDefault<dc_base_amazon_fee_report_log>(" select * from dc_base_amazon_fee_report_log where report_type=@report_type and ana_status=@status order by id desc limit 1 ", new
{ {
report_type = reportTypeEnum.ToString() report_type = reportTypeEnum.ToString(),
ana_status = status
}); });
if (!string.IsNullOrWhiteSpace(data_id))
{
ana_task = MyMySqlConnection._connection.QueryFirstOrDefault<dc_base_amazon_fee_report_log>(" select * from dc_base_amazon_fee_report_log where report_type=@report_type and data_id=@data_id order by id desc limit 1 ", new
{
report_type = reportTypeEnum.ToString(),
data_id = data_id
});
}
if (ana_task == null) if (ana_task == null)
{ {
return; return;
......
...@@ -58,9 +58,10 @@ namespace ResetOutofstock ...@@ -58,9 +58,10 @@ namespace ResetOutofstock
//new AmazonDataSynchroService().SynchroReportIds(); //new AmazonDataSynchroService().SynchroReportIds();
//new AmazonDataSynchroService().SynchroReportIds(FikaAmazonAPI.Utils.Constants.ReportTypes.GET_V2_SETTLEMENT_REPORT_DATA_XML, 13, "Siqidzi","BE"); //new AmazonDataSynchroService().SynchroReportIds(FikaAmazonAPI.Utils.Constants.ReportTypes.GET_V2_SETTLEMENT_REPORT_DATA_XML, 13, "Siqidzi","BE");
//new AmazonDataSynchroService().SynchroReportIds(FikaAmazonAPI.Utils.Constants.ReportTypes.GET_AMAZON_FULFILLED_SHIPMENTS_DATA_GENERAL, 13);
//while (true) //while (true)
//{ //{
// new AmazonDataSynchroService().AnaReport(status:-3); // new AmazonDataSynchroService().AnaReport(status:-3);
//} //}
//new AmazonDataSynchroService().AnaReport(data_id: "17339571721"); //new AmazonDataSynchroService().AnaReport(data_id: "17339571721");
} }
......
...@@ -692,6 +692,7 @@ namespace ResetOutofstock ...@@ -692,6 +692,7 @@ namespace ResetOutofstock
{ {
Console.WriteLine($"开始 解析亚马逊报表(发货流水),线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}"); Console.WriteLine($"开始 解析亚马逊报表(发货流水),线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
new AmazonDataSynchroService().AnaFbaShipmentReport(); new AmazonDataSynchroService().AnaFbaShipmentReport();
new AmazonDataSynchroService().AnaFbaShipmentReport(-1);
Console.WriteLine($"结束 解析亚马逊报表(发货流水),线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}"); Console.WriteLine($"结束 解析亚马逊报表(发货流水),线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
Thread.Sleep(1000 * 3 ); Thread.Sleep(1000 * 3 );
} }
......
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