This commit is contained in:
苏尹岚
2020-10-19 15:51:41 +08:00
parent 50ec6409b0
commit c741ad227a
5 changed files with 35 additions and 18 deletions

View File

@@ -1,6 +1,7 @@
package jdapi
import (
"fmt"
"testing"
"git.rosy.net.cn/baseapi"
@@ -41,16 +42,8 @@ func TestQueryChildCategoriesForOP(t *testing.T) {
func TestBatchUpdateOutSkuId(t *testing.T) {
result, err := api.BatchUpdateOutSkuId([]*SkuIDPair{
&SkuIDPair{
SkuId: 2012286956,
OutSkuId: "2",
},
&SkuIDPair{
SkuId: 2029317908,
OutSkuId: "34523",
},
&SkuIDPair{
SkuId: 2012286957,
OutSkuId: "3",
SkuId: 2037664182,
OutSkuId: "",
},
})
baseapi.SugarLogger.Debug(utils.Format4Output(result, false), err)
@@ -260,3 +253,26 @@ func TestUpdateShopCategory(t *testing.T) {
t.Fatal(err)
}
}
func TestQueren(t *testing.T) {
for i := 1; i < 85; i++ {
result, _, _ := api.QuerySkuInfos(&QuerySkuParam{
PageNo: i,
})
fmt.Println(i)
for _, v := range result {
api.UpdateSku2(&OpSkuParam{
TraceID: utils.GetUUID(),
OutSkuID: v.OutSkuID,
})
}
}
// result, _, err := api.QuerySkuInfos(&QuerySkuParam{
// PageNo: 1,
// })
// if err != nil {
// t.Fatal(err)
// }
// t.Log(utils.Format4Output(result, false))
}