shanji 3 years ago
parent
commit
881985415f
  1. 6
      BBWY.Server.Business/PlatformSDK/JDBusiness.cs
  2. 12
      BBWY.Server.Business/Sync/JD/JDPopularizeReportFormOrderLevelSyncBusiness.cs

6
BBWY.Server.Business/PlatformSDK/JDBusiness.cs

@ -502,6 +502,7 @@ namespace BBWY.Server.Business
req.startDay = request.StartDate.ToString("yyyy-MM-dd");
req.endDay = request.EndDate.ToString("yyyy-MM-dd");
req.giftFlag = "0";
req.orderStatusCategory = "1";
var res = jdClient.Execute(req, request.AppToken, DateTime.Now.ToLocalTime());
if (res.IsError)
throw new BusinessException($"获取JD推广报表-Sku维度出错,{(string.IsNullOrEmpty(res.ErrorMsg) ? res.ErrMsg : res.ErrorMsg)}");
@ -524,6 +525,7 @@ namespace BBWY.Server.Business
req.startDay = request.StartDate.ToString("yyyy-MM-dd");
req.endDay = request.EndDate.ToString("yyyy-MM-dd");
req.giftFlag = "0";
req.orderStatusCategory = "1";
var res = jdClient.Execute(req, request.AppToken, DateTime.Now.ToLocalTime());
if (res.IsError)
throw new BusinessException($"获取JD推广报表-创意维度出错,{(string.IsNullOrEmpty(res.ErrorMsg) ? res.ErrMsg : res.ErrorMsg)}");
@ -546,7 +548,7 @@ namespace BBWY.Server.Business
req.isDaily = "true";
req.pageSize = "100";
req.page = request.PageIndex.ToString();
req.orderStatusCategory = "1";
var res = jdClient.Execute(req, request.AppToken, DateTime.Now.ToLocalTime());
if (res.IsError)
throw new BusinessException($"获取JD推广报表-计划维度出错,{(string.IsNullOrEmpty(res.ErrorMsg) ? res.ErrMsg : res.ErrorMsg)}");
@ -570,7 +572,7 @@ namespace BBWY.Server.Business
req.pageSize = "100";
req.isDaily = "true";
req.page = request.PageIndex.ToString();
req.orderStatusCategory = "1";
var res = jdClient.Execute(req, request.AppToken, DateTime.Now.ToLocalTime());
if (res.IsError)
throw new BusinessException($"获取JD推广报表-单元维度出错,{(string.IsNullOrEmpty(res.ErrorMsg) ? res.ErrMsg : res.ErrorMsg)}");

12
BBWY.Server.Business/Sync/JD/JDPopularizeReportFormOrderLevelSyncBusiness.cs

@ -71,10 +71,10 @@ namespace BBWY.Server.Business.Sync
DeleteOldData(shopList, startDate, endDate);
foreach (var shop in shopList)
{
Task.Factory.StartNew(() => SyncShopPopularizeReportFormOrderLevelByDate(shop, startDate, endDate, 2),
System.Threading.CancellationToken.None,
TaskCreationOptions.LongRunning,
taskSchedulerManager.JDPopularizeTaskScheduler);
//Task.Factory.StartNew(() => SyncShopPopularizeReportFormOrderLevelByDate(shop, startDate, endDate, 2),
// System.Threading.CancellationToken.None,
// TaskCreationOptions.LongRunning,
// taskSchedulerManager.JDPopularizeTaskScheduler);
Task.Factory.StartNew(() => SyncShopPopularizeReportFormOrderLevelByDate(shop, startDate, endDate, 134217728),
System.Threading.CancellationToken.None,
@ -185,7 +185,7 @@ namespace BBWY.Server.Business.Sync
AdGroupId = adGroup?.AdGroupId,
AdId = ad?.AdId,
OrderId = j.Value<string>("orderId"),
OrderTime = DateTime.ParseExact(j.Value<string>("date"), "yyyyMMddHHmmss", System.Globalization.CultureInfo.CurrentCulture),
OrderTime = DateTime.ParseExact(j.Value<string>("orderTime"), "yyyyMMddHHmmss", System.Globalization.CultureInfo.CurrentCulture),
PlaceOrderSku = j.Value<string>("skuId"),
PopularizeSku = popularizeSku
});
@ -215,7 +215,7 @@ namespace BBWY.Server.Business.Sync
ShopId = shopId,
CreateTime = DateTime.Now,
CampaignId = campaigns.FirstOrDefault(c => c.CampaignName == j.Value<string>("campaignName"))?.CampaignId,
OrderTime = DateTime.ParseExact(j.Value<string>("date"), "yyyyMMddHHmmss", System.Globalization.CultureInfo.CurrentCulture),
OrderTime = DateTime.ParseExact(j.Value<string>("orderTime"), "yyyyMMddHHmmss", System.Globalization.CultureInfo.CurrentCulture),
OrderId = j.Value<string>("orderId"),
PlaceOrderSku = j.Value<string>("skuId"),
PopularizeSku = j.Value<string>("clickSkuId")

Loading…
Cancel
Save