createwarehouse param
This commit is contained in:
@@ -344,6 +344,8 @@ func (a *API) CreateWarehouse(param *warehouse_create_request.WarehouseCreatePar
|
|||||||
response, err := request.Execute(a.accessTokenObj)
|
response, err := request.Execute(a.accessTokenObj)
|
||||||
globals.SugarLogger.Debugf("创建单个区域仓=========:%s", request.GetUrlPath())
|
globals.SugarLogger.Debugf("创建单个区域仓=========:%s", request.GetUrlPath())
|
||||||
globals.SugarLogger.Debugf("创建单个区域仓:=%s", utils.Format4Output(response, false))
|
globals.SugarLogger.Debugf("创建单个区域仓:=%s", utils.Format4Output(response, false))
|
||||||
|
globals.SugarLogger.Debugf("创建单个区域仓param=%v", request.GetParams())
|
||||||
|
globals.SugarLogger.Debugf("创建单个区域仓param=%v", request.Param.Warehouse.AddressDetail)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,9 @@ import (
|
|||||||
warehouse_setFence_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/warehouse_setFence/request"
|
warehouse_setFence_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/warehouse_setFence/request"
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
"git.rosy.net.cn/jx-callback/globals"
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
|
"reflect"
|
||||||
|
"strconv"
|
||||||
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
@@ -219,7 +222,7 @@ func TestUpdateStore(t *testing.T) {
|
|||||||
func TestGetWarehouseByStore(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":""}`
|
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)
|
a := New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", accesstoken)
|
||||||
resp, err := a.GetWarehouseByStore(62490423)
|
resp, err := a.GetWarehouseByStore(69608467)
|
||||||
fmt.Println(resp)
|
fmt.Println(resp)
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
}
|
}
|
||||||
@@ -277,17 +280,21 @@ func TestGetStoreSaleLimit(t *testing.T) {
|
|||||||
|
|
||||||
//更新电子围栏
|
//更新电子围栏
|
||||||
func TestSplitFence(t *testing.T) {
|
func TestSplitFence(t *testing.T) {
|
||||||
//tempStr := strings.Split("104.111331,30.67964544419017;104.13348225189759,30.671752134736078;104.14265760085712,30.652696;104.13348225189759,30.63363986526392;104.111331,30.625746555809826;104.08917974810242,30.63363986526392;104.0800043991429,30.652696;104.08917974810242,30.671752134736078", ";")
|
tempStr := strings.Split("104.111331,30.67964544419017;104.13348225189759,30.671752134736078;104.14265760085712,30.652696;104.13348225189759,30.63363986526392;104.111331,30.625746555809826;104.08917974810242,30.63363986526392;104.0800043991429,30.652696;104.08917974810242,30.671752134736078", ";")
|
||||||
//fmt.Printf("%d", len(tempStr))
|
fmt.Println(len(tempStr))
|
||||||
|
//var (
|
||||||
fmt.Println(float64(120733783) / float64(1000000))
|
// Longitude float64
|
||||||
fmt.Println(utils.Int64ToFloat64(120733783) / float64(1000000))
|
// Latitude float64
|
||||||
//for v := len(tempStr) - 1; v >= 0; v-- {
|
//)
|
||||||
// s2 := strings.Split(tempStr[v], ",")
|
for v := len(tempStr) - 1; v >= 0; v-- {
|
||||||
// Longitude := utils.Str2Float64(s2[0])
|
s2 := strings.Split(tempStr[v], ",")
|
||||||
// Latitude := utils.Str2Float64(s2[1])
|
//Longitude := utils.Str2Float64(s2[0])
|
||||||
// fmt.Printf("%f,%f\n", Longitude, Latitude)
|
Longitude, _ := strconv.ParseFloat(s2[0], 64)
|
||||||
//}
|
Latitude := utils.Str2Float64(s2[1])
|
||||||
|
fmt.Printf("%f,%f\n", Longitude, Latitude)
|
||||||
|
fmt.Println("Longitude type:", reflect.TypeOf(Longitude))
|
||||||
|
fmt.Println("Latitude type:", reflect.TypeOf(Latitude))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//运费模板
|
//运费模板
|
||||||
|
|||||||
Reference in New Issue
Block a user