|
|
@ -20,6 +20,8 @@ namespace BBWY.Server.Business.Sync |
|
|
|
{ |
|
|
|
public class JDPopularizeReportFormAdLevelSyncBusiness : BaseSyncBusiness, IDenpendency |
|
|
|
{ |
|
|
|
|
|
|
|
private char[] separator_dx = new char[] { '-' }; |
|
|
|
public JDPopularizeReportFormAdLevelSyncBusiness(RestApiService restApiService, |
|
|
|
IOptions<GlobalConfig> options, |
|
|
|
NLogManager nLogManager, |
|
|
@ -133,10 +135,22 @@ namespace BBWY.Server.Business.Sync |
|
|
|
foreach (var j in jArray) |
|
|
|
{ |
|
|
|
var adName = j.Value<string>("adName"); |
|
|
|
|
|
|
|
var skuMatch = Regex.Match(adName, @"^(.*-)?(\d+)-(.*)$"); |
|
|
|
string sku; |
|
|
|
if (skuMatch.Success) |
|
|
|
sku = skuMatch.Groups[2].Value; |
|
|
|
else |
|
|
|
{ |
|
|
|
skuMatch = Regex.Match(adName, @"^(.*)-(\d+)$"); |
|
|
|
if (!skuMatch.Success) |
|
|
|
continue; |
|
|
|
var sku = skuMatch.Groups[2].Value; |
|
|
|
sku = skuMatch.Groups[2].Value; |
|
|
|
} |
|
|
|
|
|
|
|
if (sku == j.Value<string>("adId")) |
|
|
|
continue; |
|
|
|
|
|
|
|
insertList.Add(new JDPopularizeAdSku() |
|
|
|
{ |
|
|
|
Id = idGenerator.NewLong(), |
|
|
|