同步错误返回
This commit is contained in:
@@ -206,16 +206,15 @@ func StoreSkuInfoList2Ebai(storeSkuList []*partner.StoreSkuInfo) (outList ebaiap
|
|||||||
func (p *PurchaseHandler) UpdateStoreSkusPrice(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (failedList []*tasksch.ErrMsg, err error) {
|
func (p *PurchaseHandler) UpdateStoreSkusPrice(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (failedList []*tasksch.ErrMsg, err error) {
|
||||||
if globals.EnableEbaiStoreWrite {
|
if globals.EnableEbaiStoreWrite {
|
||||||
if len(storeSkuList) > 1 {
|
if len(storeSkuList) > 1 {
|
||||||
|
opResult, err2 := api.EbaiAPI.SkuPriceUpdateBatch(ctx.GetTrackInfo(), utils.Int2Str(storeID), StoreSkuInfoList2Ebai(storeSkuList), ebaiapi.SkuIDTypeSkuID)
|
||||||
// _, err2 := api.EbaiAPI.SkuPriceUpdateBatch(ctx.GetTrackInfo(), utils.Int2Str(storeID), StoreSkuInfoList2Ebai(storeSkuList), ebaiapi.SkuIDTypeSkuID)
|
if err = err2; err != nil && opResult != nil {
|
||||||
// if err = err2; err != nil && opResult != nil {
|
failedList = putils.SelectStoreSkuListByOpResult(storeID, storeSkuList, opResult)
|
||||||
// failedList = putils.SelectStoreSkuListByOpResult(storeID, storeSkuList, opResult)
|
|
||||||
// }
|
|
||||||
} else if len(storeSkuList) == 1 {
|
|
||||||
opResult2, err := api.EbaiAPI.SkuPriceUpdateOne(ctx.GetTrackInfo(), utils.Int2Str(storeID), StoreSkuInfoList2Ebai(storeSkuList)[0])
|
|
||||||
if err != nil && opResult2 != nil {
|
|
||||||
failedList = putils.SelectStoreSkuListByOpResult(storeID, storeSkuList, opResult2)
|
|
||||||
}
|
}
|
||||||
|
} else if len(storeSkuList) == 1 {
|
||||||
|
err = api.EbaiAPI.SkuPriceUpdateOne(ctx.GetTrackInfo(), utils.Int2Str(storeID), StoreSkuInfoList2Ebai(storeSkuList)[0])
|
||||||
|
// if err != nil && opResult2 != nil {
|
||||||
|
// failedList = putils.SelectStoreSkuListByOpResult(storeID, storeSkuList, opResult2)
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return failedList, err
|
return failedList, err
|
||||||
|
|||||||
Reference in New Issue
Block a user