diff --git a/platformapi/tiktok_shop/tiktok_api/afs_test.go b/platformapi/tiktok_shop/tiktok_api/afs_test.go index 92baeaee..ec418eba 100644 --- a/platformapi/tiktok_shop/tiktok_api/afs_test.go +++ b/platformapi/tiktok_shop/tiktok_api/afs_test.go @@ -7,8 +7,9 @@ import ( "testing" ) -var token = `{"access_token":"7b2a921d-176e-42e9-ae43-2ff47bc84ad3","expires_in":1697682826,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"633e1be6-6dfb-4c51-9e71-72502a35330e","authority_id":""}` -var a = New("7267745202649957900", "51998fcf-d521-4553-8c0c-fa662c8dbd6e", token) +var token1 = `{"access_token":"7b2a921d-176e-42e9-ae43-2ff47bc84ad3","expires_in":1697682826,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"633e1be6-6dfb-4c51-9e71-72502a35330e","authority_id":""}` +var token3 = `{"access_token":"6cf0af8c-8d96-4d20-b1e3-91187f31e694","expires_in":1698285505,"scope":"SCOPE","shop_id":68032645,"shop_name":"美好菜市","refresh_token":"69b9fd26-ff8a-48ab-ae50-b5241aa1ee03","authority_id":""}` +var a = New("7267745202649957900", "51998fcf-d521-4553-8c0c-fa662c8dbd6e", token3) // 查询售后单详情 func TestAfsOrder(t *testing.T) { @@ -17,8 +18,6 @@ func TestAfsOrder(t *testing.T) { // 同意/拒绝售后单 func TestAggreOrNotAggreAfs(t *testing.T) { - var token = `{"access_token":"7b2a921d-176e-42e9-ae43-2ff47bc84ad3","expires_in":1697682826,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"633e1be6-6dfb-4c51-9e71-72502a35330e","authority_id":""}` - var a = New("7267745202649957900", "51998fcf-d521-4553-8c0c-fa662c8dbd6e", token) a.AfterSaleOperate(int32(101), "7291211691059085608", "1", 0) fmt.Println("11", 8|16|32|1) } diff --git a/platformapi/tiktok_shop/tiktok_api/transport_test.go b/platformapi/tiktok_shop/tiktok_api/transport_test.go index 4bb7332a..162f21dd 100644 --- a/platformapi/tiktok_shop/tiktok_api/transport_test.go +++ b/platformapi/tiktok_shop/tiktok_api/transport_test.go @@ -15,7 +15,9 @@ func TestGetDispatcherInfo(t *testing.T) { fmt.Println(err) } func TestCancelWaybill(t *testing.T) { - err := a.ShopOrderDispatcher(64250755, "5030722721087718866", 2) + token := `{"access_token":"6cf0af8c-8d96-4d20-b1e3-91187f31e694","expires_in":1698285505,"scope":"SCOPE","shop_id":68032645,"shop_name":"美好菜市","refresh_token":"69b9fd26-ff8a-48ab-ae50-b5241aa1ee03","authority_id":""}` + var a = New("7267745202649957900", "51998fcf-d521-4553-8c0c-fa662c8dbd6e", token) + err := a.ShopOrderDispatcher(95431015, "6922785324337338227", 2) fmt.Println(err) } @@ -39,7 +41,11 @@ func Test(t *testing.T) { } func TestGetShipmentInfo(t *testing.T) { - data, err := a.GetShipmentInfo(6922112012008166892, 0, ShipmentTypeInvoice) + var token = `{"access_token":"6cf0af8c-8d96-4d20-b1e3-91187f31e694","expires_in":1698285505,"scope":"SCOPE","shop_id":68032645,"shop_name":"美好菜市","refresh_token":"69b9fd26-ff8a-48ab-ae50-b5241aa1ee03","authority_id":""}` + //var token = `{"access_token":"8a693254-f1e8-4427-b41f-6762a88fd53a","expires_in":1698285505,"scope":"SCOPE","shop_id":68023619,"shop_name":"京西到家","refresh_token":"265c95d1-7c6b-407b-ab8c-2481c993480f","authority_id":""}` + var a = New("7267745202649957900", "51998fcf-d521-4553-8c0c-fa662c8dbd6e", token) + + data, err := a.GetShipmentInfo(6922785324337338227, 0, ShipmentTypeInvoice) globals.SugarLogger.Debugf("======data := %s", utils.Format4Output(data, false)) globals.SugarLogger.Debugf("======data := %s", utils.Format4Output(err, false)) } diff --git a/platformapi/tiktok_shop/tiktok_api/waybill_delivery.go b/platformapi/tiktok_shop/tiktok_api/waybill_delivery.go new file mode 100644 index 00000000..95c624ec --- /dev/null +++ b/platformapi/tiktok_shop/tiktok_api/waybill_delivery.go @@ -0,0 +1,5 @@ +package tiktok_api + +func (a *API) CancelDelivery() { + +}