createwarehouse param

This commit is contained in:
richboo111
2022-11-08 13:49:48 +08:00
parent 19fba4c7d2
commit 0c9420593e
4 changed files with 23 additions and 7 deletions

View File

@@ -12,7 +12,7 @@ type WarehouseCreateRequest struct {
}
func (c *WarehouseCreateRequest) GetUrlPath() string {
return "/warehouse/create"
return "/warehouse/createV2"
}
func New() *WarehouseCreateRequest {

View File

@@ -8,5 +8,5 @@ type WarehouseCreateResponse struct {
}
type WarehouseCreateData struct {
// 仓库id
Data int64 `json:"data"`
WarehouseId string `json:"warehouse_id"`
}

View File

@@ -8,7 +8,7 @@ import (
"time"
)
var token = `{"access_token":"d590b649-0dd9-4988-a5e2-bf7e06e2f105","expires_in":1667808519,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"f57c6a55-af5f-45ca-8ade-b2282be86341","authority_id":""}`
var token = `{"access_token":"4a9e3612-7b23-4443-be73-c994f8462b1c","expires_in":1668413647,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"20d0ebb2-fefe-4ae6-b902-c35b8459b74a","authority_id":""}`
var a = New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", token)
// 查询售后单详情

View File

@@ -13,6 +13,7 @@ import (
warehouse_bindFences_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/warehouse_bindFences/request"
warehouse_bindFencesByStore_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/warehouse_bindFencesByStore/request"
warehouse_bindStore_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/warehouse_bindStore/request"
warehouse_create_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/warehouse_create/request"
warehouse_createBatch_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/warehouse_createBatch/request"
warehouse_createFence_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/warehouse_createFence/request"
warehouse_setFence_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/warehouse_setFence/request"
@@ -220,9 +221,7 @@ func TestUpdateStore(t *testing.T) {
//获取门店绑定仓库
func TestGetWarehouseByStore(t *testing.T) {
accesstoken := `{"access_token":"d590b649-0dd9-4988-a5e2-bf7e06e2f105","expires_in":1667808519,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"f57c6a55-af5f-45ca-8ade-b2282be86341","authority_id":""}`
a := New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", accesstoken)
resp, err := a.GetWarehouseByStore(69608467)
resp, err := a.GetWarehouseByStore(65402632)
fmt.Println(resp)
fmt.Println(err)
}
@@ -337,9 +336,26 @@ func TestGetStoreBindFreight(t *testing.T) {
//仓库
//创建单个仓库
func TestCreateWarehouse(t *testing.T) {
warehouseID, err := a.CreateWarehouse(&warehouse_create_request.WarehouseCreateParam{
OutWarehouseId: "test1108",
Intro: "这是一个测试区域仓",
Warehouse: &warehouse_create_request.Warehouse{
AddressDetail: "这是一个测试仓库地址",
WarehouseLocation: &warehouse_create_request.WarehouseLocation{
AddressId1: 35,
AddressId2: 350100,
AddressId3: 350104,
AddressId4: 0,
},
},
})
fmt.Println(warehouseID)
fmt.Println(err)
}
// 批量创建区域仓
func TestCreateWarehouse(t *testing.T) {
func TestBatchCreateWarehouse(t *testing.T) {
token := `{"access_token":"a1746210-a8a3-4497-a87b-09d1f10dbb95","expires_in":1665652230,"scope":"SCOPE","shop_id":"","shop_name":"小时达开放平台对接专用店","refresh_token":"c1cf8d88-0983-4f2a-b969-3746fae6b0cd","authority_id":""}`
a := New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", token)