3c认证信息导入商品库
This commit is contained in:
1 parent
ee7fb49749
commit
1b4c2cb53d
5 files changed
+113
-10
No files matched your search
@@ -32,9 +32,9 @@ namespace AllBase
|
||||
/// 版本ID
|
||||
/// </summary>
|
||||
public static int VersionCount = 1369;
|
||||
public static string MainPath = "29wx";
|
||||
//public static string MainPath = "29wx";
|
||||
//public static string MainPath = "29pdd";
|
||||
//public static string MainPath = "29wx";
|
||||
public static string MainPath = "29pdd";
|
||||
//public static string MainPath = "kuajingda";
|
||||
//public static int VersionCount = 613;
|
||||
|
||||
|
||||
@@ -280,11 +280,24 @@ namespace AllBase.Model.Param.PDDProdParam
|
||||
public object length { get; set; }
|
||||
public object oversea_sku { get; set; }
|
||||
public string sku_srv_templates { get; set; }
|
||||
public List<object> shipment_limit_second_list { get; set; }
|
||||
public List<sku_basic_property_dtos_item> sku_basic_property_dtos { get; set; }
|
||||
|
||||
public List<object> shipment_limit_second_list { get; set; }
|
||||
public string sku69_code { get; set; }
|
||||
}
|
||||
|
||||
public class spec_param
|
||||
public class sku_basic_property_dtos_item
|
||||
{
|
||||
public long? template_pid { get; set; } // 644659,
|
||||
public long? template_module_id { get; set; } // 90178,
|
||||
public long? ref_pid { get; set; } // 421,
|
||||
public long? pid { get; set; } // 59,
|
||||
public long? vid { get; set; } // 0,
|
||||
public string value { get; set; } // "2025010914795128",
|
||||
public string value_unit { get; set; } // ""
|
||||
}
|
||||
|
||||
public class spec_param
|
||||
{
|
||||
public long? parent_id { get; set; }
|
||||
public string parent_name { get; set; }
|
||||
|
||||
@@ -142,7 +142,8 @@ namespace AllBase.Model.Result.PDDResult
|
||||
public long? shipment_limit_second { get; set; } // 172800,
|
||||
public List<PDDFrontProductInfo2_gallery> gallery { get; set; }
|
||||
public List<PDDFrontProductInfo2_goods_property> goods_property { get; set; }
|
||||
public int? property_show_num { get; set; } // 3,
|
||||
public List<PDDFrontProductInfo2_sku_property> sku_property { get; set; }
|
||||
public int? property_show_num { get; set; } // 3,
|
||||
public int? has_activity { get; set; } // 1,
|
||||
public long? created_at { get; set; } // 1745853825,
|
||||
public string short_name { get; set; } // "男士休闲冰丝7分裤夏季运动短裤宽松大码七分五分裤中裤大裤衩",
|
||||
@@ -161,7 +162,22 @@ namespace AllBase.Model.Result.PDDResult
|
||||
public long? reference_id { get; set; }
|
||||
}
|
||||
|
||||
public class PDDFrontProductInfo2_gallery
|
||||
public class PDDFrontProductInfo2_sku_property
|
||||
{
|
||||
public long? sku_id { get; set; } // 1978065019392
|
||||
public List<PDDFrontProductInfo2_sku_property_detail> property { get; set; }
|
||||
}
|
||||
|
||||
public class PDDFrontProductInfo2_sku_property_detail
|
||||
{
|
||||
public string key { get; set; } // "3C认证证书编号"
|
||||
public List<string> values { get; set; } // [ "2025010914795128" ],
|
||||
public long? ref_pid { get; set; } // 421
|
||||
public long? reference_id { get; set; } // 0
|
||||
}
|
||||
|
||||
|
||||
public class PDDFrontProductInfo2_gallery
|
||||
{
|
||||
public long? id { get; set; } // 1324122714994,
|
||||
public long? goods_id { get; set; } // 740124855378,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using AllBase.Model.Param.PDDProdParam;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -276,15 +277,22 @@ namespace AllBase.Model.Result.PDDResult
|
||||
public object out_source_sku_id { get; set; }
|
||||
public object dd_grocery_sku_params { get; set; }
|
||||
public object sku_extended_attribute_dtos { get; set; }
|
||||
public object sku_basic_property_dtos { get; set; }
|
||||
public object spec_note_map { get; set; }
|
||||
//public object sku_basic_property_dtos { get; set; }
|
||||
public List<sku_basic_property_dtos_item_with_key> sku_basic_property_dtos { get; set; }
|
||||
public object spec_note_map { get; set; }
|
||||
public object delivery_schedule_dtos { get; set; }
|
||||
public List<object> shipment_limit_second_list { get; set; }
|
||||
public string sku69_code { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class spec_item
|
||||
public class sku_basic_property_dtos_item_with_key : sku_basic_property_dtos_item
|
||||
{
|
||||
public string key { get; set; } // 3C认证证书编号
|
||||
}
|
||||
|
||||
|
||||
public class spec_item
|
||||
{
|
||||
public long? parent_id { get; set; }
|
||||
public string parent_name { get; set; }
|
||||
|
||||
@@ -743,6 +743,72 @@ namespace TemuKJD.BLL
|
||||
if (frontSku?.sku_price != null && frontSku.sku_price > 0)
|
||||
skuInfo.multi_price = Math.Min(skuInfo.multi_price.ParseToInt(), (int)frontSku.sku_price.ParseToDecimal());
|
||||
|
||||
if (frontProdInfo.goods.sku_property?.FirstOrDefault(sp => sp.sku_id == frontSku.sku_id) is PDDFrontProductInfo2_sku_property skuProperty &&
|
||||
skuProperty.property.Any(pp => pp.key == "3C认证证书编号"))
|
||||
{
|
||||
skuInfo.sku_basic_property_dtos = new List<sku_basic_property_dtos_item_with_key>();
|
||||
foreach (var p in skuProperty.property)
|
||||
{
|
||||
if (p.key == "3C认证证书编号")
|
||||
{
|
||||
skuInfo.sku_basic_property_dtos.Add(new sku_basic_property_dtos_item_with_key
|
||||
{
|
||||
template_pid = 644659,
|
||||
template_module_id = 90178,
|
||||
ref_pid = 421,
|
||||
pid = 59,
|
||||
vid = 0,
|
||||
value = p.values.FirstOrDefault(),
|
||||
value_unit = "",
|
||||
key = p.key,
|
||||
});
|
||||
}
|
||||
else if (p.key == "型号")
|
||||
{
|
||||
skuInfo.sku_basic_property_dtos.Add(new sku_basic_property_dtos_item_with_key
|
||||
{
|
||||
template_pid = 644662,
|
||||
template_module_id = 90178,
|
||||
ref_pid = 311,
|
||||
pid = 6,
|
||||
vid = 0,
|
||||
value = p.values.FirstOrDefault(),
|
||||
value_unit = "",
|
||||
key = p.key,
|
||||
});
|
||||
}
|
||||
else if (p.key == "商品条码")
|
||||
{
|
||||
skuInfo.sku_basic_property_dtos.Add(new sku_basic_property_dtos_item_with_key
|
||||
{
|
||||
template_pid = 644663,
|
||||
template_module_id = 90178,
|
||||
ref_pid = 3798,
|
||||
pid = 787,
|
||||
vid = 0,
|
||||
value = p.values.FirstOrDefault(),
|
||||
value_unit = "",
|
||||
key = p.key,
|
||||
});
|
||||
}
|
||||
else if (p.key == "批次号")
|
||||
{
|
||||
skuInfo.sku_basic_property_dtos.Add(new sku_basic_property_dtos_item_with_key
|
||||
{
|
||||
|
||||
template_pid = 644666,
|
||||
template_module_id = 90178,
|
||||
ref_pid = 3830,
|
||||
pid = 791,
|
||||
vid = 0,
|
||||
value = p.values.FirstOrDefault(),
|
||||
value_unit = "",
|
||||
key = p.key,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//List<string> specIds = frontSku.spec.Split(',').ToList();
|
||||
//List<string> specKeys = frontSku.spec_keys.Split(';').ToList();
|
||||
//List<string> specValues = frontSku.spec_values.Split(';').ToList();
|
||||
|
||||
Reference in new issue
Block a user