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 = "商品违规检测失败,继续上传")); } }