1
This commit is contained in:
@@ -178,8 +178,8 @@ func MtWmSyncSkuPriceAndStatus(db *dao.DaoDB, sm *model.StoreMap, skuMap map[str
|
||||
// EBaiSyncSkuPriceAndStatus 校验饿了么平台和京西系统商品差异
|
||||
func EBaiSyncSkuPriceAndStatus(db *dao.DaoDB, sm *model.StoreMap, skuMap map[string]*model.StoreSkuBind) (err error) {
|
||||
var (
|
||||
ebaiApi = apimanager.CurAPIManager.GetAPI(sm.VendorID, sm.VendorOrgCode).(*ebaiapi.API)
|
||||
skuIdOffset = 0
|
||||
ebaiApi = apimanager.CurAPIManager.GetAPI(sm.VendorID, sm.VendorOrgCode).(*ebaiapi.API)
|
||||
//skuIdOffset = 0
|
||||
foodListData = make([]*ebaiapi.SkuInfo, 0, 0)
|
||||
errs = make([]string, 0, 0)
|
||||
)
|
||||
@@ -191,9 +191,9 @@ func EBaiSyncSkuPriceAndStatus(db *dao.DaoDB, sm *model.StoreMap, skuMap map[str
|
||||
for {
|
||||
page := 1
|
||||
param := &ebaiapi.SkuListParams{
|
||||
Page: page,
|
||||
PageSize: 100,
|
||||
SkuIdOffset: skuIdOffset,
|
||||
Page: page,
|
||||
PageSize: 100,
|
||||
//SkuIdOffset: skuIdOffset,
|
||||
}
|
||||
foodList, err := ebaiApi.SkuList(utils.Int2Str(sm.StoreID), param)
|
||||
if err != nil {
|
||||
@@ -205,7 +205,7 @@ func EBaiSyncSkuPriceAndStatus(db *dao.DaoDB, sm *model.StoreMap, skuMap map[str
|
||||
if len(foodList.List) < 100 {
|
||||
break
|
||||
}
|
||||
skuIdOffset = foodList.SkuIdOffset
|
||||
//skuIdOffset = foodList.SkuIdOffset
|
||||
page += 1
|
||||
}
|
||||
globals.SugarLogger.Debugf("======len foodListData:= %d", len(foodListData))
|
||||
@@ -238,7 +238,9 @@ func EBaiSyncSkuPriceAndStatus(db *dao.DaoDB, sm *model.StoreMap, skuMap map[str
|
||||
}
|
||||
} else {
|
||||
globals.SugarLogger.Debugf("=========vsl.CustomSkuId := %s", vsl.CustomSkuId)
|
||||
err = ebaiApi.SkuOfflineOne(jxcontext.AdminCtx.GetTrackInfo(), utils.Int2Str(sm.StoreID), utils.Str2Int64(vsl.CustomSkuId), "", "")
|
||||
_, err = ebaiApi.SkuDelete(jxcontext.AdminCtx.GetTrackInfo(), utils.Int2Str(sm.StoreID), nil, []string{vsl.CustomSkuId})
|
||||
|
||||
//err = ebaiApi.SkuOfflineOne(jxcontext.AdminCtx.GetTrackInfo(), utils.Int2Str(sm.StoreID), utils.Str2Int64(vsl.CustomSkuId), "", "")
|
||||
if err != nil {
|
||||
errs = append(errs, fmt.Sprintf("skuCode:%d,修改饿百不可售状态错误%v", sku.SkuID, err))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user