修正和重构代码

This commit is contained in:
Rosy-zhudan
2019-08-29 16:05:29 +08:00
parent 21c1c3c514
commit 1ea9c5aca2
5 changed files with 24 additions and 39 deletions

View File

@@ -328,25 +328,13 @@ func (p *PurchaseHandler) GetStoreSkusFullInfo(ctx *jxcontext.Context, parentTas
}
return nil, err2
}, pages)
tasksch.HandleTask(task, parentTask, false).Run()
tasksch.HandleTask(task, parentTask, true).Run()
result, err2 := task.GetResult(0)
if err = err2; err == nil {
for _, v := range result {
skuNameList = append(skuNameList, vendorSku2Jx(v.(*ebaiapi.SkuInfo)))
}
}
// for pageIndex := 2; pageIndex <= page1.Pages; pageIndex++ {
// callParams := &ebaiapi.SkuListParams{
// PageSize: ebaiapi.MaxSkuListPageSize,
// Page: pageIndex,
// }
// pageSku, err2 := api.EbaiAPI.SkuList(utils.Int2Str(storeID), callParams)
// if err2 == nil {
// for _, v := range pageSku.List {
// skuNameList = append(skuNameList, vendorSku2Jx(v))
// }
// }
// }
}
}
return skuNameList, err