导入微信格式数据 增加上架时间判断,如果大于指定时间则不上传
This commit is contained in:
1 parent
967f1488fd
commit
c75735db0c
7 files changed
+123
-50
No files matched your search
@@ -17,7 +17,7 @@ using Work;
|
||||
namespace TemuKJD.BLL
|
||||
{
|
||||
public class PDDProdFormConverter
|
||||
{
|
||||
{
|
||||
/// <summary>
|
||||
/// 拼多多前端采集转拼多多后台采集数据
|
||||
/// </summary>
|
||||
@@ -330,11 +330,11 @@ namespace TemuKJD.BLL
|
||||
dbProd.product_json = JsonHelper.SerializeObject(prodInfo);
|
||||
|
||||
if (!isSaveDb)
|
||||
return "success" + dbProd.product_json;
|
||||
return "success" + dbProd.product_json;
|
||||
|
||||
|
||||
// 商品采集权限用户采集的数据加上用户前缀(商品前缀显示给用户的时候隐藏)
|
||||
string collectAuthorityTag = "";
|
||||
// 商品采集权限用户采集的数据加上用户前缀(商品前缀显示给用户的时候隐藏)
|
||||
string collectAuthorityTag = "";
|
||||
if (IsCollectAuthorityUser)
|
||||
collectAuthorityTag = "-" + BaseClass.UserName;
|
||||
|
||||
@@ -806,10 +806,10 @@ namespace TemuKJD.BLL
|
||||
dbProd.product_json = JsonHelper.SerializeObject(prodInfo);
|
||||
|
||||
if (!isSaveDb)
|
||||
return "success" + dbProd.product_json;
|
||||
return "success" + dbProd.product_json;
|
||||
|
||||
// 商品采集权限用户采集的数据加上用户前缀(商品前缀显示给用户的时候隐藏)
|
||||
string collectAuthorityTag = "";
|
||||
// 商品采集权限用户采集的数据加上用户前缀(商品前缀显示给用户的时候隐藏)
|
||||
string collectAuthorityTag = "";
|
||||
if (IsCollectAuthorityUser)
|
||||
collectAuthorityTag = "-" + BaseClass.UserName;
|
||||
|
||||
@@ -968,7 +968,7 @@ namespace TemuKJD.BLL
|
||||
});
|
||||
galleryIndex++;
|
||||
}
|
||||
foreach (var videoGallery in frontProdInfo.goods.videoGallery)
|
||||
foreach (var videoGallery in frontProdInfo.goods.videoGallery)
|
||||
{
|
||||
prodInfo.detail.galleries.Add(new gallery_item()
|
||||
{
|
||||
@@ -1209,11 +1209,11 @@ namespace TemuKJD.BLL
|
||||
dbProd.main_img = prodInfo.detail.galleries.FirstOrDefault(g => g.type == 1).url;
|
||||
dbProd.product_json = JsonHelper.SerializeObject(prodInfo);
|
||||
|
||||
if (!isSaveDb)
|
||||
return "success" + dbProd.product_json;
|
||||
if (!isSaveDb)
|
||||
return "success" + dbProd.product_json;
|
||||
|
||||
// 商品采集权限用户采集的数据加上用户前缀(商品前缀显示给用户的时候隐藏)
|
||||
string collectAuthorityTag = "";
|
||||
// 商品采集权限用户采集的数据加上用户前缀(商品前缀显示给用户的时候隐藏)
|
||||
string collectAuthorityTag = "";
|
||||
if (IsCollectAuthorityUser)
|
||||
collectAuthorityTag = "-" + BaseClass.UserName;
|
||||
|
||||
@@ -1614,11 +1614,11 @@ namespace TemuKJD.BLL
|
||||
dbProd.main_img = prodInfo.detail.galleries.FirstOrDefault(g => g.type == 1).url;
|
||||
dbProd.product_json = JsonHelper.SerializeObject(prodInfo);
|
||||
|
||||
if (!isSaveDb)
|
||||
return "success" + dbProd.product_json;
|
||||
if (!isSaveDb)
|
||||
return "success" + dbProd.product_json;
|
||||
|
||||
// 商品采集权限用户采集的数据加上用户前缀(商品前缀显示给用户的时候隐藏)
|
||||
string collectAuthorityTag = "";
|
||||
// 商品采集权限用户采集的数据加上用户前缀(商品前缀显示给用户的时候隐藏)
|
||||
string collectAuthorityTag = "";
|
||||
if (IsCollectAuthorityUser)
|
||||
collectAuthorityTag = "-" + BaseClass.UserName;
|
||||
|
||||
@@ -1689,21 +1689,21 @@ namespace TemuKJD.BLL
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 外来格式V5
|
||||
/// </summary>
|
||||
/// <param name="outProdJson"></param>
|
||||
/// <param name="UpdateOldData"></param>
|
||||
/// <param name="specialProdType"></param>
|
||||
/// <param name="IsCollectAuthorityUser"></param>
|
||||
/// <returns></returns>
|
||||
public string PddFrontToPddBackConvertFactory(string filePath, bool UpdateOldData = true, string specialProdType = null, bool IsCollectAuthorityUser = false, bool isSaveDb = true, string content = null)
|
||||
/// <summary>
|
||||
/// 外来格式V5
|
||||
/// </summary>
|
||||
/// <param name="outProdJson"></param>
|
||||
/// <param name="UpdateOldData"></param>
|
||||
/// <param name="specialProdType"></param>
|
||||
/// <param name="IsCollectAuthorityUser"></param>
|
||||
/// <returns></returns>
|
||||
public string PddFrontToPddBackConvertFactory(string filePath, bool UpdateOldData = true, string specialProdType = null, bool IsCollectAuthorityUser = false, bool isSaveDb = true, string content = null, DateTime? listingTime = null)
|
||||
{
|
||||
PDDFrontProductInfo5 frontProdInfo = null;
|
||||
try
|
||||
{
|
||||
if (!content.IsNullOrEmpty())
|
||||
frontProdInfo = ConverterToPddFactory.SetContentConvert(content);
|
||||
frontProdInfo = ConverterToPddFactory.SetContentConvert(content);
|
||||
else
|
||||
frontProdInfo = ConverterToPddFactory.Convert(filePath);
|
||||
}
|
||||
@@ -1716,7 +1716,13 @@ namespace TemuKJD.BLL
|
||||
{
|
||||
return "商品数据信息为空";
|
||||
}
|
||||
|
||||
if (frontProdInfo.ListingTime != null && listingTime != null)
|
||||
{
|
||||
if (frontProdInfo.ListingTime <= listingTime)
|
||||
{
|
||||
return "上架日期超出范围";
|
||||
}
|
||||
}
|
||||
|
||||
KJDDBProduct dbProd = new KJDDBProduct() { size_json = "{}" };
|
||||
PDDProductInfo prodInfo = new PDDProductInfo()
|
||||
@@ -2010,10 +2016,10 @@ namespace TemuKJD.BLL
|
||||
dbProd.product_json = JsonHelper.SerializeObject(prodInfo);
|
||||
|
||||
if (!isSaveDb)
|
||||
return "success" + dbProd.product_json;
|
||||
return "success" + dbProd.product_json;
|
||||
|
||||
// 商品采集权限用户采集的数据加上用户前缀(商品前缀显示给用户的时候隐藏)
|
||||
string collectAuthorityTag = "";
|
||||
// 商品采集权限用户采集的数据加上用户前缀(商品前缀显示给用户的时候隐藏)
|
||||
string collectAuthorityTag = "";
|
||||
if (IsCollectAuthorityUser)
|
||||
collectAuthorityTag = "-" + BaseClass.UserName;
|
||||
|
||||
|
||||
Reference in new issue
Block a user