同步错误返回修改,err都是nil
This commit is contained in:
@@ -129,6 +129,7 @@ func (p *PurchaseHandler) updateStoreSkus(ctx *jxcontext.Context, storeID int, v
|
||||
api.EbaiAPI.SkuShopCategoryMap(strStoreID, utils.Str2Int64(storeSku.VendorSkuID), "", utils.Str2Int64(storeSku.VendorCatID), genSkuCatRank(storeSku))
|
||||
})
|
||||
}
|
||||
err = nil
|
||||
}
|
||||
return failedList, err
|
||||
}
|
||||
@@ -157,6 +158,7 @@ func (p *PurchaseHandler) CreateStoreSkus(ctx *jxcontext.Context, storeID int, v
|
||||
} else {
|
||||
vendorSkuID = jxutils.GenFakeID()
|
||||
}
|
||||
err = nil
|
||||
storeSku.VendorSkuID = utils.Int64ToStr(vendorSkuID)
|
||||
return failedList, err
|
||||
}
|
||||
@@ -179,6 +181,7 @@ func (p *PurchaseHandler) DeleteStoreSkus(ctx *jxcontext.Context, storeID int, v
|
||||
// successList = putils.UnselectStoreSkuListByVendorSkuIDs(storeSkuList, getFailedVendorSkuIDsFromOpResult(opResult))
|
||||
// }
|
||||
}
|
||||
err = nil
|
||||
}
|
||||
return failedList, err
|
||||
}
|
||||
@@ -193,7 +196,6 @@ func (p *PurchaseHandler) UpdateStoreSkusStatus(ctx *jxcontext.Context, vendorOr
|
||||
} else if len(vendorSkuIDs) == 1 {
|
||||
err = api.EbaiAPI.SkuOnlineOne(ctx.GetTrackInfo(), utils.Int2Str(storeID), vendorSkuIDs[0], "", "")
|
||||
if err != nil {
|
||||
|
||||
failedList = putils.GetErrMsg2FailedSingleList(storeSkuList, err, storeID, model.VendorIDEBAI, "更新商品状态")
|
||||
}
|
||||
return failedList, err
|
||||
@@ -213,6 +215,7 @@ func (p *PurchaseHandler) UpdateStoreSkusStatus(ctx *jxcontext.Context, vendorOr
|
||||
failedList = SelectStoreSkuListByOpResult(storeSkuList, opResult, storeID, model.VendorIDEBAI, "更新商品状态")
|
||||
// failedList = putils.UnselectStoreSkuListByVendorSkuIDs(storeSkuList, getFailedVendorSkuIDsFromOpResult(opResult))
|
||||
}
|
||||
err = nil
|
||||
}
|
||||
return failedList, err
|
||||
}
|
||||
@@ -243,6 +246,7 @@ func (p *PurchaseHandler) UpdateStoreSkusPrice(ctx *jxcontext.Context, vendorOrg
|
||||
failedList = putils.GetErrMsg2FailedSingleList(storeSkuList, err, storeID, model.VendorIDEBAI, "更新商品价格")
|
||||
}
|
||||
}
|
||||
err = nil
|
||||
}
|
||||
return failedList, err
|
||||
}
|
||||
@@ -261,6 +265,7 @@ func (p *PurchaseHandler) UpdateStoreSkusStock(ctx *jxcontext.Context, vendorOrg
|
||||
failedList = putils.GetErrMsg2FailedSingleList(storeSkuList, err, storeID, model.VendorIDEBAI, "更新商品库存")
|
||||
}
|
||||
}
|
||||
err = nil
|
||||
}
|
||||
return failedList, err
|
||||
}
|
||||
|
||||
@@ -135,6 +135,7 @@ func (p *PurchaseHandler) UpdateStoreSkusStatus(ctx *jxcontext.Context, vendorOr
|
||||
// successList = putils.UnselectStoreSkuListBySkuIDs(storeSkuList, utils.StringSlice2Int(getStrOutSkuIDs(responseList, false)))
|
||||
}
|
||||
}
|
||||
err = nil
|
||||
return failedList, err
|
||||
}
|
||||
|
||||
@@ -165,6 +166,7 @@ func (p *PurchaseHandler) UpdateStoreSkusPrice(ctx *jxcontext.Context, vendorOrg
|
||||
}
|
||||
}
|
||||
}
|
||||
err = nil
|
||||
return failedList, err
|
||||
}
|
||||
|
||||
@@ -196,6 +198,7 @@ func (p *PurchaseHandler) UpdateStoreSkusStock(ctx *jxcontext.Context, vendorOrg
|
||||
}
|
||||
}
|
||||
}
|
||||
err = nil
|
||||
return failedList, err
|
||||
}
|
||||
|
||||
|
||||
@@ -314,6 +314,12 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
||||
failedList = SelectStoreSkuListByFoodList(storeSkuList, failedFoodList, storeID, model.VendorIDMTWM, syncType)
|
||||
// successList = putils.UnselectStoreSkuSyncListByVendorSkuIDs(storeSkuList, getAppFoodCodeList(failedFoodList))
|
||||
}
|
||||
} else if err2 != nil && len(failedFoodList) == 0 {
|
||||
if errExt, ok := err2.(*utils.ErrorWithCode); ok {
|
||||
err = utils.UnmarshalUseNumber([]byte(errExt.ErrMsg()), &failedFoodList)
|
||||
failedList = SelectStoreSkuListByFoodList(storeSkuList, failedFoodList, storeID, model.VendorIDMTWM, syncType)
|
||||
}
|
||||
err = nil
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -348,6 +354,7 @@ func (p *PurchaseHandler) DeleteStoreSkus(ctx *jxcontext.Context, storeID int, v
|
||||
failedList = SelectStoreSkuListByFoodList(storeSkuList, myMap["retail_error_list"], storeID, model.VendorIDMTWM, "批量删除商品")
|
||||
}
|
||||
}
|
||||
err = nil
|
||||
}
|
||||
}
|
||||
return failedList, err
|
||||
@@ -389,6 +396,12 @@ func (p *PurchaseHandler) UpdateStoreSkusStatus(ctx *jxcontext.Context, vendorOr
|
||||
failedList = SelectStoreSkuListByFoodList(storeSkuList, failedFoodList, storeID, model.VendorIDMTWM, "更新商品状态")
|
||||
// successList = putils.UnselectStoreSkuListByVendorSkuIDs(storeSkuList, getAppFoodCodeList(failedFoodList))
|
||||
}
|
||||
} else if err2 != nil && len(failedFoodList) == 0 {
|
||||
if errExt, ok := err2.(*utils.ErrorWithCode); ok {
|
||||
err = utils.UnmarshalUseNumber([]byte(errExt.ErrMsg()), &failedFoodList)
|
||||
failedList = SelectStoreSkuListByFoodList(storeSkuList, failedFoodList, storeID, model.VendorIDMTWM, "更新商品状态")
|
||||
}
|
||||
err = nil
|
||||
}
|
||||
}
|
||||
return failedList, err
|
||||
@@ -402,6 +415,12 @@ func (p *PurchaseHandler) UpdateStoreSkusPrice(ctx *jxcontext.Context, vendorOrg
|
||||
if len(failedFoodList) > 0 {
|
||||
failedList = SelectStoreSkuListByFoodList(storeSkuList, failedFoodList, storeID, model.VendorIDMTWM, "更新商品价格")
|
||||
}
|
||||
} else if err2 != nil && len(failedFoodList) == 0 {
|
||||
if errExt, ok := err2.(*utils.ErrorWithCode); ok {
|
||||
err = utils.UnmarshalUseNumber([]byte(errExt.ErrMsg()), &failedFoodList)
|
||||
failedList = SelectStoreSkuListByFoodList(storeSkuList, failedFoodList, storeID, model.VendorIDMTWM, "更新商品价格")
|
||||
}
|
||||
err = nil
|
||||
}
|
||||
}
|
||||
return failedList, err
|
||||
@@ -418,6 +437,12 @@ func (p *PurchaseHandler) UpdateStoreSkusStock(ctx *jxcontext.Context, vendorOrg
|
||||
//if err = putils.GenPartialFailedErr(failedFoodList, len(failedFoodList)); err != nil {
|
||||
// successList = putils.UnselectStoreSkuListByVendorSkuIDs(storeSkuList, getAppFoodCodeList(failedFoodList))
|
||||
// }
|
||||
} else if err2 != nil && len(failedFoodList) == 0 {
|
||||
if errExt, ok := err2.(*utils.ErrorWithCode); ok {
|
||||
err = utils.UnmarshalUseNumber([]byte(errExt.ErrMsg()), &failedFoodList)
|
||||
failedList = SelectStoreSkuListByFoodList(storeSkuList, failedFoodList, storeID, model.VendorIDMTWM, "更新商品库存")
|
||||
}
|
||||
err = nil
|
||||
}
|
||||
}
|
||||
return failedList, err
|
||||
|
||||
Reference in New Issue
Block a user