Commit ad542336 by lizefeng

fix

parent eeeb8172
......@@ -41,7 +41,7 @@ namespace AutoTurnOver.Models.ApiDto
}
}
public string MarketPlaceJson { get; set; }
public MarketPlaceDto MarketPlaceObj
public MarketPlaceDto MarketPlaceObjBak
{
get
{
......
......@@ -24,11 +24,11 @@ namespace FikaAmazonAPI.Services
Task.Run(() => GetReportsAsync(parameterReportList)).ConfigureAwait(false).GetAwaiter().GetResult();
public async Task<List<Report>> GetReportsAsync(ParameterReportList parameterReportList, CancellationToken cancellationToken = default)
{
if (parameterReportList.marketplaceIds == null || parameterReportList.marketplaceIds.Count == 0)
{
parameterReportList.marketplaceIds = new List<string>();
parameterReportList.marketplaceIds.Add(AmazonCredential.MarketPlace.ID);
}
//if (parameterReportList.marketplaceIds == null || parameterReportList.marketplaceIds.Count == 0)
//{
// parameterReportList.marketplaceIds = new List<string>();
// parameterReportList.marketplaceIds.Add(AmazonCredential.MarketPlace.ID);
//}
if (parameterReportList.createdSince.HasValue)
{
var totalDays = (parameterReportList.createdSince.Value - DateTime.UtcNow).TotalDays;
......
......@@ -44,6 +44,10 @@ namespace FikaAmazonAPI.Utils
public static MarketPlace GetMarketplaceByCountryCode(string countryCode)
{
if (countryCode == "UK")
{
countryCode = "GB";
}
var list = new List<MarketPlace>();
//NorthAmerica
list.Add(US); list.Add(Canada); list.Add(Mexico); list.Add(Brazil);
......
......@@ -54,12 +54,13 @@ namespace ResetOutofstock
//new AmazonDataSynchroService().SynchroFinancialEventGroups();
//new AmazonDataSynchroService().SetMarketplaceName(DateTime.Now);
//new AmazonDataSynchroService().SetSettlementByDate();
//new AmazonDataSynchroService().SetMarketplaceNameByDate();
//new AmazonDataSynchroService().SynchroReportIds();
//new AmazonDataSynchroService().SynchroReportIds(FikaAmazonAPI.Utils.Constants.ReportTypes.GET_V2_SETTLEMENT_REPORT_DATA_XML, 12, "Siqidzi");
//new AmazonDataSynchroService().SynchroReportIds(FikaAmazonAPI.Utils.Constants.ReportTypes.GET_V2_SETTLEMENT_REPORT_DATA_XML, 13, "Siqidzi","BE");
//while (true)
//{
// new AmazonDataSynchroService().AnaReport(status:-1);
// new AmazonDataSynchroService().AnaReport(status:-3);
//}
//new AmazonDataSynchroService().AnaReport(data_id: "17339571721");
}
......
......@@ -623,7 +623,7 @@ namespace ResetOutofstock
try
{
Console.WriteLine($"开始 拉取亚马逊费用流水,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
new AmazonDataSynchroService().SynchroReportIds(FikaAmazonAPI.Utils.Constants.ReportTypes.GET_V2_SETTLEMENT_REPORT_DATA_XML,12);
new AmazonDataSynchroService().SynchroReportIds(FikaAmazonAPI.Utils.Constants.ReportTypes.GET_V2_SETTLEMENT_REPORT_DATA_XML,13);
Console.WriteLine($"结束 拉取亚马逊费用流水,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
Thread.Sleep(1000 * 60 * 3 );
}
......@@ -760,6 +760,7 @@ namespace ResetOutofstock
{
Console.WriteLine($"开始 提现记录追溯结算id,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
new AmazonDataSynchroService().SetSettlementByDate();
new AmazonDataSynchroService().SetMarketplaceNameByDate();
Console.WriteLine($"结束 提现记录追溯结算id,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
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