From 9bd1cee0d825fd0b1d327a20e3019f7039b9258c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 26 Oct 2022 10:19:58 +0800 Subject: [PATCH] 1 --- platformapi/jdapi/jdapi_test.go | 2 +- platformapi/jdapi/order_test.go | 6 ++-- platformapi/jdapi/store_sku_test.go | 49 +++++++++++++++-------------- platformapi/jdapi/store_test.go | 22 ++++++++----- 4 files changed, 43 insertions(+), 36 deletions(-) diff --git a/platformapi/jdapi/jdapi_test.go b/platformapi/jdapi/jdapi_test.go index 73e51955..58c56630 100644 --- a/platformapi/jdapi/jdapi_test.go +++ b/platformapi/jdapi/jdapi_test.go @@ -23,7 +23,7 @@ func init() { // sandbox // api = New("594ab45a-9a73-4a43-82b0-a64cbd55d883", "06692746f7224695ad4788ce340bc854", "d6b42a35a7414a5490d811654d745c84") // prod - api = New("73e2e9f6-b21e-4dcd-8c92-71e4e100b07e", "21b627c23ea04c69b64b48d0b361213e", "51cd27a748e64c829b4b7f83f4844610") + api = New("73e2e9f6-b21e-4dcd-8c92-71e4e100b07e", "1dba76d40cac446ca500c0391a0b6c9d", "a88d031a1e7b462cb1579f12e97fe7f4") // 天天果园 //api = New("c45e6510-00ba-4be2-977e-bcb9c9792cc7", "5d5577a2506f41b8b4ec520ba83490f5", "0b01b9eeb15b41dab1c3d05d95c17a26") // 京东果园 diff --git a/platformapi/jdapi/order_test.go b/platformapi/jdapi/order_test.go index bb2d7a84..2b3a7f86 100644 --- a/platformapi/jdapi/order_test.go +++ b/platformapi/jdapi/order_test.go @@ -30,7 +30,7 @@ func TestPickUp(t *testing.T) { func TestOrderQuery(t *testing.T) { jdParams := map[string]interface{}{ - "orderId": "813344594000041", + "orderId": "2225712287000273", } result, totalCount, err := api.OrderQuery(jdParams) if err != nil { @@ -94,7 +94,7 @@ func TestDeliveryEndOrder(t *testing.T) { } func TestGetAfsService(t *testing.T) { - result, err := api.GetAfsService("34081924") + result, err := api.GetAfsService("2225735125000294") if err != nil { t.Fatal(err.Error()) } @@ -138,7 +138,7 @@ func TestOrderQuery2(t *testing.T) { } func TestGetByOrderNoForOaos(t *testing.T) { - orderList, err := api.GetByOrderNoForOaos("2108504597000531") + orderList, err := api.GetByOrderNoForOaos("2225735125000294") t.Log(utils.Format4Output(orderList, false)) if err != nil { t.Fatal(err.Error()) diff --git a/platformapi/jdapi/store_sku_test.go b/platformapi/jdapi/store_sku_test.go index c1738515..ccfa0052 100644 --- a/platformapi/jdapi/store_sku_test.go +++ b/platformapi/jdapi/store_sku_test.go @@ -31,30 +31,31 @@ func TestDelVipPrice(t *testing.T) { // t.Log(utils.Format4Output(result, false)) } -func TestQueryOpenUseable(t *testing.T) { - result, err := api.QueryOpenUseable([]*BaseStockCenterRequest{ - &BaseStockCenterRequest{ - StationNo: mustExistStoreID, - SkuId: mustExistSkuID, - }, - }) - if err != nil { - t.Fatal(err) - } - t.Log(utils.Format4Output(result, false)) -} - -func TestQueryStockCenter(t *testing.T) { - result, err := api.QueryStockCenter(mustExistStoreJXID, []*SkuIdEntity{ - &SkuIdEntity{ - OutSkuId: mustExistSkuJXID, - }, - }, "test") - if err != nil { - t.Fatal(err) - } - t.Log(utils.Format4Output(result, false)) -} +// +//func TestQueryOpenUseable(t *testing.T) { +// result, err := api.QueryOpenUseable([]*BaseStockCenterRequest{ +// &BaseStockCenterRequest{ +// StationNo: mustExistStoreID, +// SkuId: mustExistSkuID, +// }, +// }) +// if err != nil { +// t.Fatal(err) +// } +// t.Log(utils.Format4Output(result, false)) +//} +// +//func TestQueryStockCenter(t *testing.T) { +// result, err := api.QueryStockCenter(mustExistStoreJXID, []*SkuIdEntity{ +// &SkuIdEntity{ +// OutSkuId: mustExistSkuJXID, +// }, +// }, "test") +// if err != nil { +// t.Fatal(err) +// } +// t.Log(utils.Format4Output(result, false)) +//} func TestBatchUpdateVendibility(t *testing.T) { result, err := api.BatchUpdateVendibility("", "100130", "", []*StockVendibility{ diff --git a/platformapi/jdapi/store_test.go b/platformapi/jdapi/store_test.go index ce284dc1..171984f1 100644 --- a/platformapi/jdapi/store_test.go +++ b/platformapi/jdapi/store_test.go @@ -1,5 +1,10 @@ package jdapi +import ( + "git.rosy.net.cn/baseapi/utils" + "testing" +) + // //import ( // "testing" @@ -42,14 +47,15 @@ package jdapi // } //} // -//func TestGetStoreInfoByStationNo(t *testing.T) { -// result, err := api.GetStoreInfoByStationNo2("11946249") -// if err != nil { -// t.Fatal(err) -// } -// t.Log(utils.Format4Output(result, false)) -// -//} +func TestGetStoreInfoByStationNo(t *testing.T) { + result, err := api.GetStoreInfoByStationNo2("12002719") + if err != nil { + t.Fatal(err) + } + t.Log(utils.Format4Output(result, false)) + +} + // //func TestUpdateStoreInfo4Open(t *testing.T) { // result, err := api.GetStoreInfoByStationNo2(mustExistStoreID)