- 京东handler不直接依赖api.JdAPI
This commit is contained in:
@@ -83,7 +83,7 @@ package jd
|
||||
// // todo 以下可以优化为并行操作
|
||||
// // globals.SugarLogger.Debug(utils.Format4Output(skuVendibilityList, false), utils.Format4Output(skuPriceInfoList, false), utils.Format4Output(skuStockList, false))
|
||||
// if len(skuVendibilityList) > 0 {
|
||||
// if _, err = api.JdAPI.BatchUpdateVendibility(ctx.GetTrackInfo(), "", stationNo, skuVendibilityList, ctx.GetUserName()); err == nil {
|
||||
// if _, err = getAPI("").BatchUpdateVendibility(ctx.GetTrackInfo(), "", stationNo, skuVendibilityList, ctx.GetUserName()); err == nil {
|
||||
// syncMask |= model.SyncFlagSaleMask
|
||||
// } else {
|
||||
// if !isPartialFailed {
|
||||
@@ -94,9 +94,9 @@ package jd
|
||||
// }
|
||||
// if (err == nil || isContinueWhenError) && len(skuStockList) > 0 {
|
||||
// if len(skuStockList) == 1 {
|
||||
// err = api.JdAPI.UpdateCurrentQty(ctx.GetTrackInfo(), stationNo, utils.Str2Int64WithDefault(vendorSkuID4Qty, 0), skuStockList[0].StockQty)
|
||||
// err = getAPI("").UpdateCurrentQty(ctx.GetTrackInfo(), stationNo, utils.Str2Int64WithDefault(vendorSkuID4Qty, 0), skuStockList[0].StockQty)
|
||||
// } else {
|
||||
// _, err = api.JdAPI.BatchUpdateCurrentQtys(ctx.GetTrackInfo(), "", stationNo, skuStockList, ctx.GetUserName())
|
||||
// _, err = getAPI("").BatchUpdateCurrentQtys(ctx.GetTrackInfo(), "", stationNo, skuStockList, ctx.GetUserName())
|
||||
// }
|
||||
// if err == nil {
|
||||
// syncMask |= model.SyncFlagNewMask | model.SyncFlagDeletedMask
|
||||
@@ -109,9 +109,9 @@ package jd
|
||||
// }
|
||||
// if (err == nil || isContinueWhenError) && len(skuPriceInfoList) > 0 {
|
||||
// if len(skuPriceInfoList) == 1 {
|
||||
// _, err = api.JdAPI.UpdateStationPrice(ctx.GetTrackInfo(), utils.Str2Int64WithDefault(vendorSkuID4Price, 0), stationNo, skuPriceInfoList[0].Price)
|
||||
// _, err = getAPI("").UpdateStationPrice(ctx.GetTrackInfo(), utils.Str2Int64WithDefault(vendorSkuID4Price, 0), stationNo, skuPriceInfoList[0].Price)
|
||||
// } else {
|
||||
// _, err = api.JdAPI.UpdateVendorStationPrice(ctx.GetTrackInfo(), "", stationNo, skuPriceInfoList)
|
||||
// _, err = getAPI("").UpdateVendorStationPrice(ctx.GetTrackInfo(), "", stationNo, skuPriceInfoList)
|
||||
// }
|
||||
// if err == nil {
|
||||
// syncMask |= model.SyncFlagPriceMask
|
||||
|
||||
Reference in New Issue
Block a user