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)
|
||||
globals.SugarLogger.Debugf("创建单个区域仓=========:%s", request.GetUrlPath())
|
||||
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 {
|
||||
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"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"reflect"
|
||||
"strconv"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
@@ -219,7 +222,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(62490423)
|
||||
resp, err := a.GetWarehouseByStore(69608467)
|
||||
fmt.Println(resp)
|
||||
fmt.Println(err)
|
||||
}
|
||||
@@ -277,17 +280,21 @@ func TestGetStoreSaleLimit(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", ";")
|
||||
//fmt.Printf("%d", len(tempStr))
|
||||
|
||||
fmt.Println(float64(120733783) / float64(1000000))
|
||||
fmt.Println(utils.Int64ToFloat64(120733783) / float64(1000000))
|
||||
//for v := len(tempStr) - 1; v >= 0; v-- {
|
||||
// s2 := strings.Split(tempStr[v], ",")
|
||||
// Longitude := utils.Str2Float64(s2[0])
|
||||
// Latitude := utils.Str2Float64(s2[1])
|
||||
// fmt.Printf("%f,%f\n", Longitude, Latitude)
|
||||
//}
|
||||
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.Println(len(tempStr))
|
||||
//var (
|
||||
// Longitude float64
|
||||
// Latitude float64
|
||||
//)
|
||||
for v := len(tempStr) - 1; v >= 0; v-- {
|
||||
s2 := strings.Split(tempStr[v], ",")
|
||||
//Longitude := utils.Str2Float64(s2[0])
|
||||
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