修复非云端商品库违规检测失败bug
This commit is contained in:
1 parent
0381dafd65
commit
99d6d01827
1 file changed
+8
-11
@@ -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<long> { 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 = "商品违规检测失败,继续上传"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user