diff --git a/TEMUKJD/BLL/ImportConverters/ConverterWXToPddV5.cs b/TEMUKJD/BLL/ImportConverters/ConverterWXToPddV5.cs index 5fcc8ea..5856844 100644 --- a/TEMUKJD/BLL/ImportConverters/ConverterWXToPddV5.cs +++ b/TEMUKJD/BLL/ImportConverters/ConverterWXToPddV5.cs @@ -344,7 +344,7 @@ namespace TemuKJD.BLL.ImportConverters /// /// 获取SKU和规格信息 /// - private Tuple ,List> GetSkusAndSpecs() + private Tuple, List> GetSkusAndSpecs() { var skuList = new List(); var specList = new List(); @@ -360,6 +360,7 @@ namespace TemuKJD.BLL.ImportConverters { var skuId = spec["skuId"]?.Value(); var specText = spec["spec"]?.Value(); + specText = specText.Replace('+', ';'); if (!string.IsNullOrEmpty(skuId) && !string.IsNullOrEmpty(specText)) { skuSpecDict[skuId] = specText; @@ -386,7 +387,7 @@ namespace TemuKJD.BLL.ImportConverters { specText = cachedSpec; // 解析 "颜色分类:牛油果/尺码:S" 格式 - foreach (var part in cachedSpec.Split('/')) + foreach (var part in cachedSpec.Split(new char[] { '/', '+', ';' }, StringSplitOptions.RemoveEmptyEntries)) { var kv = part.Split(':'); if (kv.Length == 2) diff --git a/TEMUKJD/BLL/PDDProdFormConverter.cs b/TEMUKJD/BLL/PDDProdFormConverter.cs index 93b0331..73558e3 100644 --- a/TEMUKJD/BLL/PDDProdFormConverter.cs +++ b/TEMUKJD/BLL/PDDProdFormConverter.cs @@ -1959,8 +1959,8 @@ namespace TemuKJD.BLL var specList = skuItem.Spec.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries).ToList(); foreach (var spec in specList) { - string specKey = spec.Split(':')[0]; - string specValue = spec.Split(':')[1]; + string specKey = spec.Split(':')[0].Trim(); + string specValue = spec.Split(':')[1].Trim(); var specItem = frontProdInfo.Specs.FirstOrDefault(a => a.SpecKey == specKey && a.SpecValue == specValue); if (specItem == null) continue; skuInfo.spec.Add(new spec_item() diff --git a/TEMUKJD/WXForms/ProductForms/WXUserCollectAuthProdListForm.Designer.cs b/TEMUKJD/WXForms/ProductForms/WXUserCollectAuthProdListForm.Designer.cs index 53d0bbc..2aeb735 100644 --- a/TEMUKJD/WXForms/ProductForms/WXUserCollectAuthProdListForm.Designer.cs +++ b/TEMUKJD/WXForms/ProductForms/WXUserCollectAuthProdListForm.Designer.cs @@ -94,6 +94,7 @@ namespace TemuKJD.WXForms.ProductForms this.chkTime = new TemuKJD.UserComponent.UcCheckBox(this.components); this.dtpStart = new System.Windows.Forms.DateTimePicker(); this.dtpEnd = new System.Windows.Forms.DateTimePicker(); + this.label10 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label(); this.splitContainer2 = new System.Windows.Forms.SplitContainer(); this.lblRelation = new System.Windows.Forms.Label(); @@ -153,7 +154,6 @@ namespace TemuKJD.WXForms.ProductForms this.col_select_product = new System.Windows.Forms.DataGridViewLinkColumn(); this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage(); this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); - this.label10 = new System.Windows.Forms.Label(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.txt_listing_time = new System.Windows.Forms.TextBox(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); @@ -977,6 +977,18 @@ namespace TemuKJD.WXForms.ProductForms this.dtpEnd.Size = new System.Drawing.Size(99, 23); this.dtpEnd.TabIndex = 982; // + // label10 + // + this.label10.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(832, 77); + this.label10.Margin = new System.Windows.Forms.Padding(3, 7, 0, 0); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(56, 17); + this.label10.TabIndex = 983; + this.label10.Text = "上架日期"; + this.toolTip1.SetToolTip(this.label10, "导入数据时超出时间(天)范围的不导入"); + // // label7 // this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); @@ -1643,18 +1655,6 @@ namespace TemuKJD.WXForms.ProductForms this.statusBar.Size = new System.Drawing.Size(1438, 25); this.statusBar.TabIndex = 5; // - // label10 - // - this.label10.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(832, 77); - this.label10.Margin = new System.Windows.Forms.Padding(3, 7, 0, 0); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(56, 17); - this.label10.TabIndex = 983; - this.label10.Text = "上架日期"; - this.toolTip1.SetToolTip(this.label10, "导入数据时超出时间(天)范围的不导入"); - // // txt_listing_time // this.txt_listing_time.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) @@ -1666,7 +1666,7 @@ namespace TemuKJD.WXForms.ProductForms this.txt_listing_time.Name = "txt_listing_time"; this.txt_listing_time.Size = new System.Drawing.Size(101, 25); this.txt_listing_time.TabIndex = 984; - this.txt_listing_time.Text = "30"; + this.txt_listing_time.Text = "365"; // // WXUserCollectAuthProdListForm // diff --git a/test/KJD.Test/UnitTest1.cs b/test/KJD.Test/UnitTest1.cs index bdb9b0a..688fe27 100644 --- a/test/KJD.Test/UnitTest1.cs +++ b/test/KJD.Test/UnitTest1.cs @@ -143,7 +143,7 @@ namespace KJD.Test [Test] public void TestWXToPDDV4() { - string filePath = @"C:\Users\chaih\Documents\xwechat_files\hongfei357_a567\msg\file\2026-10\导入失败数据包\10000023711970.txt"; + string filePath = @"C:\Users\chaih\Documents\xwechat_files\hongfei357_a567\msg\file\2026-10\10001443620622.json"; var frontProdInfo = ConverterToPddFactory.Convert(filePath); var isMatch = frontProdInfo != null; Console.WriteLine(frontProdInfo.Skus.Count);