- TransformJdSpu2Sku忽略平台中不存在相应条目
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user