- add conf enableJdStoreWrite
- enable enableEbaiStoreWrite on beta
This commit is contained in:
@@ -436,7 +436,7 @@ func CreateJdPromotion(ctx *jxcontext.Context, isIDJd bool, isAsync, isContinueW
|
||||
for k, v := range modifyPrices {
|
||||
modifyPrices2[k] = v.(*jdapi.SkuPriceInfo)
|
||||
}
|
||||
if globals.EnableStoreWrite {
|
||||
if globals.EnableJdStoreWrite {
|
||||
if _, err = api.JdAPI.UpdateVendorStationPrice(utils.Int2Str(storeID), "", modifyPrices2); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -1048,7 +1048,7 @@ func getPromotionHander(promotionType int) JdPromotionHandler {
|
||||
// panic(fmt.Sprintf("unknown promotion type:%d", promotionType))
|
||||
return nil
|
||||
}
|
||||
if !globals.EnableStoreWrite {
|
||||
if !globals.EnableJdStoreWrite {
|
||||
promotionHandler = &JdNullHandler{}
|
||||
}
|
||||
return promotionHandler
|
||||
|
||||
@@ -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