- add conf enableJdStoreWrite

- enable enableEbaiStoreWrite on beta
This commit is contained in:
gazebo
2019-04-29 10:35:45 +08:00
parent f403a74bc0
commit c462510b2d
13 changed files with 47 additions and 37 deletions

View File

@@ -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 {