From 99d6d01827236d503db45f5ab106a44a4aa32672 Mon Sep 17 00:00:00 2001 From: chfei Date: Fri, 30 Oct 2026 19:16:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=9D=9E=E4=BA=91=E7=AB=AF?= =?UTF-8?q?=E5=95=86=E5=93=81=E5=BA=93=E8=BF=9D=E8=A7=84=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProductForms/WXDBProdUploadForm.cs | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs index 57a5765..7476776 100644 --- a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs +++ b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs @@ -1715,12 +1715,16 @@ namespace TemuKJD.WXForms.ProductForms })); } - // 开启上货自动剔除时,上传前检测违规状态;违规或检测失败均禁止上传。 + // 开启上货自动剔除时,上传前检测违规状态;仅服务端明确返回违规时禁止上传。 if (GlobalConfig.GlobalSettings.AutoExcludeViolationProductsOnUpload) { + Invoke(new Action(() => cell.Value = "商品违规检测...")); try { - if (!long.TryParse(dbProd.spu_id, out var goodsId) || goodsId <= 0) + long goodsId = 0; + if (!long.TryParse(dbProd.spu_id, out goodsId) || goodsId <= 0) + throw new Exception("商品ID无效"); + if (!long.TryParse(dbProd.skc_id, out goodsId) || goodsId <= 0) throw new Exception("商品ID无效"); var statuses = CloudGoodsService.GetViolationStatus(new List { goodsId }); @@ -1732,16 +1736,9 @@ namespace TemuKJD.WXForms.ProductForms } catch (Exception ex) { + Debug.WriteLine("商品违规检测失败,继续上传:" + ex.Message); if (cell != null) - Invoke(new Action(() => cell.Value = "商品违规检测失败,禁止上传")); - - return JsonConvert.SerializeObject(new - { - success = false, - draftId = 0, - status = "未上传", - errMsg = "商品违规检测失败,禁止上传:" + ex.Message - }); + Invoke(new Action(() => cell.Value = "商品违规检测失败,继续上传")); } }