- 在删除微盟商品时,忽略商品不存在错误
This commit is contained in:
@@ -45,6 +45,7 @@ func (ctx *Context) GetAccessUUID() string {
|
||||
func (ctx *Context) GetRealRemoteIP() (ip string) {
|
||||
r := ctx.r
|
||||
if r != nil {
|
||||
globals.SugarLogger.Debugf("GetRealRemoteIP header:%s", utils.Format4Output(r.Header, false))
|
||||
ip = r.Header.Get("X-Forwarded-For")
|
||||
if ip == "" {
|
||||
ip = r.Header.Get("X-real-ip")
|
||||
|
||||
@@ -182,6 +182,8 @@ func (p *PurchaseHandler) SyncStoreSkus(ctx *jxcontext.Context, parentTask tasks
|
||||
goodsID := utils.Str2Int64WithDefault(skuItem.VendorNameID, 0)
|
||||
if err = api.WeimobAPI.UpdateGoodsShelfStatus([]int64{goodsID}, false); err == nil {
|
||||
err = api.WeimobAPI.UpdateGoodsTitle(goodsID, composeFakeDelName(skuItem.Name))
|
||||
} else if intErr, ok := err.(*utils.ErrorWithCode); ok && intErr.Code() == "1001930300001" { // 商品不存在错
|
||||
err = nil // 强制忽略
|
||||
}
|
||||
} else if skuItem.SkuSyncStatus&(model.SyncFlagModifiedMask|model.SyncFlagNewMask) != 0 {
|
||||
outerGoodsCode := utils.Int2Str(skuItem.NameID)
|
||||
|
||||
Reference in New Issue
Block a user