From 01ba8cba6bf5e7aae6d5eb22efe676df167343e4 Mon Sep 17 00:00:00 2001 From: wule_5900x Date: Mon, 25 Aug 2025 01:59:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=8A=E6=AC=A1=E6=8F=90?= =?UTF-8?q?=E4=BA=A4bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AllBase/BaseClass.cs | 4 +-- .../AdminForms/AdminProductPriceCheckForm.cs | 36 +++++++++++++++---- 2 files changed, 31 insertions(+), 9 deletions(-) diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs index 6d379f0..bea3a90 100644 --- a/AllBase/BaseClass.cs +++ b/AllBase/BaseClass.cs @@ -27,8 +27,8 @@ namespace AllBase /// /// 版本ID /// - public static int VersionCount = 552; - //public static int VersionCount = 552; + public static int VersionCount = 553; + //public static int VersionCount = 553; /// /// 版本号 diff --git a/TEMUKJD/KJDForms/AdminForms/AdminProductPriceCheckForm.cs b/TEMUKJD/KJDForms/AdminForms/AdminProductPriceCheckForm.cs index 74dcab7..f6a06a3 100644 --- a/TEMUKJD/KJDForms/AdminForms/AdminProductPriceCheckForm.cs +++ b/TEMUKJD/KJDForms/AdminForms/AdminProductPriceCheckForm.cs @@ -644,13 +644,30 @@ namespace TemuKJD.KJDForms.AdminForms var rows = this.dgvAdjust.Rows.Cast().Where(r => r.Cells["colProductId"].Value.ParseToString() == price.productId.ParseToString()).ToList(); var shop = lstAdminShopInfo.FirstOrDefault(s => s.ShopId == price.supplierId.ParseToString()); var html = editPriceProductNameBatchAdd(shop, price.productId.ParseToString()); + + + var pName = price.productName; + if ((pName.EndsWith("适合不同的搭配风格") && pName.IndexOf("个") < 4 && pName.IndexOf("个") > 0) || + (pName.EndsWith("适合不同的搭配风格") && pName.IndexOf("pcs") < 4 && pName.IndexOf("pcs") > 0)) + { + } + else + { + Invoke(new Action(() => + { + foreach (var row in rows) + row.Cells["colMsg"].Value = "标题没有可还原的关键字"; + })); + continue; + } + //{"success":true,"errorCode":1000000,"errorMsg":null,"result":{"handleFailedList":[{"failedBizId":4432690492,"failedReason":"This product has pending or in-progress modification tasks, cannot initiate again"}],"addFailedList":[{"failedBizId":4432690492,"failedReason":"This product has pending or in-progress modification tasks, cannot initiate again","failedReasonType":8}],"successBizId2TaskUidMap":{}}} if (html.Contains("This product has pending or in-progress modification tasks")) { Invoke(new Action(() => { foreach (var row in rows) - row.Cells["colMsg"].Value = "已提交过修改请求"; + row.Cells["colMsg"].Value = "已提交过修改任务"; })); continue; } @@ -674,14 +691,19 @@ namespace TemuKJD.KJDForms.AdminForms JObject jObj = JObject.Parse(html); var item = jObj["result"]["successBizId2TaskUidMap"].LastOrDefault().LastOrDefault(); - var pName = price.productName; var newPName = pName; - if (pName.EndsWith("适合不同的搭配风格") && pName.IndexOf("个") < 4) + if (pName.EndsWith("适合不同的搭配风格") && pName.IndexOf("个") < 4 && pName.IndexOf("个") > 0) { var headword = pName.Substring(0, pName.IndexOf("个") + 1); - newPName = pName.Substring(pName.IndexOf("个") + 1); + newPName = pName.Substring(pName.IndexOf("个") + "个".Length); newPName = newPName.Replace("适合不同的搭配风格", "适合" + headword + "不同的搭配风格"); } + if (pName.EndsWith("适合不同的搭配风格") && pName.IndexOf("pcs") < 4 && pName.IndexOf("pcs") >0) + { + var headword = pName.Substring(0, pName.IndexOf("pcs")); + newPName = pName.Substring(pName.IndexOf("pcs") + "pcs".Length); + newPName = newPName.Replace("适合不同的搭配风格", "适合" + headword + "个不同的搭配风格").Trim(); + } html = editPriceProductName(shop, item.ParseToString(), price.productId.ParseToString(), newPName); Thread.Sleep(Randomx.GetId(25, 75)); @@ -697,9 +719,9 @@ namespace TemuKJD.KJDForms.AdminForms { string sErrMsg = BaseRegex.GetStringJson(ref html, "errorMsg").ParseToString(); if (string.IsNullOrEmpty(sErrMsg)) - { sErrMsg = BaseRegex.GetStringJson(ref html, "error_msg").ParseToString(); - } + if (string.IsNullOrEmpty(sErrMsg)) + sErrMsg = html; Invoke(new Action(() => { foreach (var row in rows) @@ -721,7 +743,7 @@ namespace TemuKJD.KJDForms.AdminForms Invoke(new Action(() => { - this.pbLoading.Visible = true; + this.pbLoading.Visible = false; })); }); }