From 1b4c2cb53d1cd4800b229415e6389b8ca27eee25 Mon Sep 17 00:00:00 2001 From: wule_5900x Date: Sun, 1 Nov 2026 17:10:04 +0800 Subject: [PATCH] =?UTF-8?q?3c=E8=AE=A4=E8=AF=81=E4=BF=A1=E6=81=AF=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E5=95=86=E5=93=81=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AllBase/BaseClass.cs | 4 +- .../PDDProdParam/PDDProductUploadParam.cs | 17 ++++- .../Result/PDDResult/PDDFrontProductInfo2.cs | 20 +++++- .../Result/PDDResult/PDDProductDetailInfo.cs | 16 +++-- TEMUKJD/BLL/PDDProdFormConverter.cs | 66 +++++++++++++++++++ 5 files changed, 113 insertions(+), 10 deletions(-) diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs index b49b4fa..48a1093 100644 --- a/AllBase/BaseClass.cs +++ b/AllBase/BaseClass.cs @@ -32,9 +32,9 @@ namespace AllBase /// 版本ID /// 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; diff --git a/AllBase/Model/Param/PDDProdParam/PDDProductUploadParam.cs b/AllBase/Model/Param/PDDProdParam/PDDProductUploadParam.cs index 41d38f0..d44bb1b 100644 --- a/AllBase/Model/Param/PDDProdParam/PDDProductUploadParam.cs +++ b/AllBase/Model/Param/PDDProdParam/PDDProductUploadParam.cs @@ -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 shipment_limit_second_list { get; set; } + public List sku_basic_property_dtos { get; set; } + + public List 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; } diff --git a/AllBase/Model/Result/PDDResult/PDDFrontProductInfo2.cs b/AllBase/Model/Result/PDDResult/PDDFrontProductInfo2.cs index ba2875a..b0b2fe9 100644 --- a/AllBase/Model/Result/PDDResult/PDDFrontProductInfo2.cs +++ b/AllBase/Model/Result/PDDResult/PDDFrontProductInfo2.cs @@ -142,7 +142,8 @@ namespace AllBase.Model.Result.PDDResult public long? shipment_limit_second { get; set; } // 172800, public List gallery { get; set; } public List goods_property { get; set; } - public int? property_show_num { get; set; } // 3, + public List 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 property { get; set; } + } + + public class PDDFrontProductInfo2_sku_property_detail + { + public string key { get; set; } // "3C认证证书编号" + public List 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, diff --git a/AllBase/Model/Result/PDDResult/PDDProductDetailInfo.cs b/AllBase/Model/Result/PDDResult/PDDProductDetailInfo.cs index 91c4073..a49cc5a 100644 --- a/AllBase/Model/Result/PDDResult/PDDProductDetailInfo.cs +++ b/AllBase/Model/Result/PDDResult/PDDProductDetailInfo.cs @@ -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 { get; set; } + public object spec_note_map { get; set; } public object delivery_schedule_dtos { get; set; } public List 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; } diff --git a/TEMUKJD/BLL/PDDProdFormConverter.cs b/TEMUKJD/BLL/PDDProdFormConverter.cs index 73558e3..66f25d4 100644 --- a/TEMUKJD/BLL/PDDProdFormConverter.cs +++ b/TEMUKJD/BLL/PDDProdFormConverter.cs @@ -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(); + 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 specIds = frontSku.spec.Split(',').ToList(); //List specKeys = frontSku.spec_keys.Split(';').ToList(); //List specValues = frontSku.spec_values.Split(';').ToList();