From 30efeb21b9c0aed0562267e4508906f5568fc9a7 Mon Sep 17 00:00:00 2001 From: richboo111 Date: Mon, 26 Dec 2022 16:59:57 +0800 Subject: [PATCH 1/2] 1 --- .../request/superm_getDispatcherInfo_request.go | 6 +++--- .../response/superm_getDispatcherInfo_response.go | 2 +- platformapi/tiktok_shop/tiktok_api/afs_test.go | 2 +- platformapi/tiktok_shop/tiktok_api/transport.go | 8 ++++---- platformapi/tiktok_shop/tiktok_api/transport_test.go | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/platformapi/tiktok_shop/sdk-golang/api/superm_getDispatcherInfo/request/superm_getDispatcherInfo_request.go b/platformapi/tiktok_shop/sdk-golang/api/superm_getDispatcherInfo/request/superm_getDispatcherInfo_request.go index f4b35a69..ad5aeb53 100644 --- a/platformapi/tiktok_shop/sdk-golang/api/superm_getDispatcherInfo/request/superm_getDispatcherInfo_request.go +++ b/platformapi/tiktok_shop/sdk-golang/api/superm_getDispatcherInfo/request/superm_getDispatcherInfo_request.go @@ -45,7 +45,7 @@ func (c *SupermGetDispatcherInfoRequest) GetParams() *SupermGetDispatcherInfoPar } type SupermGetDispatcherInfoParam struct { - StoreID int64 `json:"storeID"` - ShopOrderID int64 `json:"shopOrderID"` - DispatcherType int32 `json:"dispatcherType"` + StoreID int64 `json:"store_id"` + ShopOrderID string `json:"shop_order_id"` + DispatcherFeeType int32 `json:"dispatcher_fee_type"` } diff --git a/platformapi/tiktok_shop/sdk-golang/api/superm_getDispatcherInfo/response/superm_getDispatcherInfo_response.go b/platformapi/tiktok_shop/sdk-golang/api/superm_getDispatcherInfo/response/superm_getDispatcherInfo_response.go index 964a4b22..4b4968ca 100644 --- a/platformapi/tiktok_shop/sdk-golang/api/superm_getDispatcherInfo/response/superm_getDispatcherInfo_response.go +++ b/platformapi/tiktok_shop/sdk-golang/api/superm_getDispatcherInfo/response/superm_getDispatcherInfo_response.go @@ -8,5 +8,5 @@ type SupermGetDispatcherInfoResponse struct { } type SupermGetDispatcherInfoData struct { - DispatcherFee int64 `json:"dispatcherFee"` //呼叫运力费用,单位 分 + DispatcherFee int64 `json:"dispatcher_fee"` //呼叫运力费用,单位 分 } diff --git a/platformapi/tiktok_shop/tiktok_api/afs_test.go b/platformapi/tiktok_shop/tiktok_api/afs_test.go index fec6ba03..d1a3be4f 100644 --- a/platformapi/tiktok_shop/tiktok_api/afs_test.go +++ b/platformapi/tiktok_shop/tiktok_api/afs_test.go @@ -18,7 +18,7 @@ import ( // "authority_id": "" //}` -var token = `{"access_token":"fedd73ba-cf87-4c27-bd9d-5f2a68e5b9fe","expires_in":1672033612,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"3ec7f275-51a5-44c7-8324-060318139893","authority_id":""}` +var token = `{"access_token":"84b9ab00-68d0-4b9f-9682-a03f75eaed95","expires_in":1672634978,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"44b1e11e-90a0-4876-b5f9-edd2bf5820e8","authority_id":""}` //var token = `{"access_token":"83e52462-ad46-4297-98c4-242ee6b7a5c8","expires_in":1672033612,"scope":"SCOPE","shop_id":63141688,"shop_name":"二期-抖音超市小时达测试店铺","refresh_token":"8f690bc3-3f3e-49bd-bbf7-31c9e868e980","authority_id":""}` var a = New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", token) diff --git a/platformapi/tiktok_shop/tiktok_api/transport.go b/platformapi/tiktok_shop/tiktok_api/transport.go index 862908d3..5e4e5a8d 100644 --- a/platformapi/tiktok_shop/tiktok_api/transport.go +++ b/platformapi/tiktok_shop/tiktok_api/transport.go @@ -16,12 +16,12 @@ import ( ) // /superm/getDispatcherInfo 运力呼叫询价/运力取消询价(正向) -func (a *API) GetDispatcherInfo(storeID, shopOrderID int64, dispatcherType int32) (int64, error) { +func (a *API) GetDispatcherInfo(storeID int64, shopOrderID string, dispatcherFeeType int32) (int64, error) { request := superm_getDispatcherInfo_request.New() request.Param = &superm_getDispatcherInfo_request.SupermGetDispatcherInfoParam{ - StoreID: storeID, - ShopOrderID: shopOrderID, - DispatcherType: dispatcherType, + StoreID: storeID, + ShopOrderID: shopOrderID, + DispatcherFeeType: dispatcherFeeType, } response, err := request.Execute(a.accessTokenObj) globals.SugarLogger.Debugf("运力呼叫询价/运力取消询价(正向)=========:%s", request.GetUrlPath()) diff --git a/platformapi/tiktok_shop/tiktok_api/transport_test.go b/platformapi/tiktok_shop/tiktok_api/transport_test.go index ba664b18..bc4377ed 100644 --- a/platformapi/tiktok_shop/tiktok_api/transport_test.go +++ b/platformapi/tiktok_shop/tiktok_api/transport_test.go @@ -7,7 +7,7 @@ import ( //运力呼叫询价(正向) func TestGetDispatcherInfo(t *testing.T) { - dispatcherFee, err := a.GetDispatcherInfo(5015175317880528282, 5015175317880528282, 1) + dispatcherFee, err := a.GetDispatcherInfo(62490423, "5016270839501385439", 1) fmt.Println(dispatcherFee) fmt.Println(err) } From 1f3311490c661d624ae03cb259cb255fbbf3a782 Mon Sep 17 00:00:00 2001 From: richboo111 Date: Mon, 26 Dec 2022 17:07:48 +0800 Subject: [PATCH 2/2] 1 --- .../request/superm_orderDispatcher_resuest.go | 8 ++++---- platformapi/tiktok_shop/tiktok_api/transport.go | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/platformapi/tiktok_shop/sdk-golang/api/superm_orderDispatcher/request/superm_orderDispatcher_resuest.go b/platformapi/tiktok_shop/sdk-golang/api/superm_orderDispatcher/request/superm_orderDispatcher_resuest.go index ab06620a..924c4a08 100644 --- a/platformapi/tiktok_shop/sdk-golang/api/superm_orderDispatcher/request/superm_orderDispatcher_resuest.go +++ b/platformapi/tiktok_shop/sdk-golang/api/superm_orderDispatcher/request/superm_orderDispatcher_resuest.go @@ -12,7 +12,7 @@ type SupermOrderDispatcherRequest struct { } func (c *SupermOrderDispatcherRequest) GetUrlPath() string { - return "/superm/orderDispatcher" + return "/superm/shopOrderDispatcher" } func New() *SupermOrderDispatcherRequest { @@ -45,7 +45,7 @@ func (c *SupermOrderDispatcherRequest) GetParams() *SupermOrderDispatcherParam { } type SupermOrderDispatcherParam struct { - StoreID int64 `json:"storeID"` - ShopOrderID int64 `json:"shopOrderID"` - DispatcherType int32 `json:"dispatcherType"` + StoreID int64 `json:"store_id"` + ShopOrderID string `json:"shop_order_id"` + DispatcherType int32 `json:"dispatcher_type"` } diff --git a/platformapi/tiktok_shop/tiktok_api/transport.go b/platformapi/tiktok_shop/tiktok_api/transport.go index 5e4e5a8d..ddfae41e 100644 --- a/platformapi/tiktok_shop/tiktok_api/transport.go +++ b/platformapi/tiktok_shop/tiktok_api/transport.go @@ -36,8 +36,8 @@ func (a *API) GetDispatcherInfo(storeID int64, shopOrderID string, dispatcherFee return response.Data.DispatcherFee, nil } -// /superm/orderDispatcher 呼叫运力并发货/重新发货、取消运力 -func (a *API) OrderDispatcher(storeID, shopOrderID int64, dispatcherType int32) error { +// /superm/shopOrderDispatcher 呼叫运力并发货/重新发货、取消运力 +func (a *API) ShopOrderDispatcher(storeID int64, shopOrderID string, dispatcherType int32) error { request := superm_orderDispatcher_request.New() request.Param = &superm_orderDispatcher_request.SupermOrderDispatcherParam{ StoreID: storeID,