From 4aca943156c64ebc2acdcf1a30479b304b4a2fb2 Mon Sep 17 00:00:00 2001 From: gazebo Date: Mon, 22 Apr 2019 14:52:41 +0800 Subject: [PATCH] =?UTF-8?q?-=20TransformJdSpu2Sku=E5=BF=BD=E7=95=A5?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E4=B8=AD=E4=B8=8D=E5=AD=98=E5=9C=A8=E7=9B=B8?= =?UTF-8?q?=E5=BA=94=E6=9D=A1=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/tempop/tempop.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/business/jxstore/tempop/tempop.go b/business/jxstore/tempop/tempop.go index 5fff12cdd..1074ce8ee 100644 --- a/business/jxstore/tempop/tempop.go +++ b/business/jxstore/tempop/tempop.go @@ -732,7 +732,11 @@ func TransformJdSpu2Sku(ctx *jxcontext.Context, skuNameIDs []int, count int, isA if !jxutils.IsFakeID(sku.JdID) { if globals.EnableStoreWrite { if err = api.JdAPI.UpdateSkuBaseInfo(utils.Int2Str(skuName.ID), utils.Int2Str(sku.ID), utils.Params2Map(jdapi.KeyFixedStatus, jdapi.SkuFixedStatusDeleted)); err != nil { - break + if errExt, ok := err.(*utils.ErrorWithCode); ok && errExt.IntCode() == 11004 { + err = nil + } else { + break + } } } } @@ -741,6 +745,8 @@ func TransformJdSpu2Sku(ctx *jxcontext.Context, skuNameIDs []int, count int, isA if err == nil && globals.EnableStoreWrite { if err = api.JdAPI.UpdateSpu(utils.Int2Str(skuName.ID), utils.Params2Map(jdapi.KeyFixedStatus, jdapi.SkuFixedStatusOffline)); err == nil { err = api.JdAPI.UpdateSpu(utils.Int2Str(skuName.ID), utils.Params2Map(jdapi.KeyFixedStatus, jdapi.SkuFixedStatusDeleted)) + } else if errExt, ok := err.(*utils.ErrorWithCode); ok && errExt.IntCode() == 11035 { + err = nil } } if err == nil {