- add conf enableJdStoreWrite
- enable enableEbaiStoreWrite on beta
This commit is contained in:
@@ -728,7 +728,7 @@ func TransformJdSpu2Sku(ctx *jxcontext.Context, skuNameIDs []int, count int, isA
|
||||
skuIDs = append(skuIDs, sku.ID)
|
||||
locker.Unlock()
|
||||
if !jxutils.IsFakeID(sku.JdID) {
|
||||
if globals.EnableStoreWrite {
|
||||
if globals.EnableJdStoreWrite {
|
||||
if err = api.JdAPI.UpdateSkuBaseInfo(utils.Int2Str(skuName.ID), utils.Int2Str(sku.ID), utils.Params2Map(jdapi.KeyFixedStatus, jdapi.SkuFixedStatusDeleted)); err != nil {
|
||||
if errExt, ok := err.(*utils.ErrorWithCode); ok && errExt.IntCode() == 11004 {
|
||||
err = nil
|
||||
@@ -740,7 +740,7 @@ func TransformJdSpu2Sku(ctx *jxcontext.Context, skuNameIDs []int, count int, isA
|
||||
}
|
||||
}
|
||||
}
|
||||
if err == nil && globals.EnableStoreWrite {
|
||||
if err == nil && globals.EnableJdStoreWrite {
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user