warehouse
This commit is contained in:
@@ -44,6 +44,16 @@ func (c *WarehouseCreateRequest) GetParams() *WarehouseCreateParam {
|
|||||||
return c.Param
|
return c.Param
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type WarehouseLocation struct {
|
||||||
|
// 省地址编码
|
||||||
|
AddressId1 int64 `json:"address_id1"`
|
||||||
|
// 市地址编码
|
||||||
|
AddressId2 int64 `json:"address_id2"`
|
||||||
|
// 区地址编码
|
||||||
|
AddressId3 int64 `json:"address_id3"`
|
||||||
|
// 街道地址编码
|
||||||
|
AddressId4 int64 `json:"address_id4"`
|
||||||
|
}
|
||||||
type WarehouseCreateParam struct {
|
type WarehouseCreateParam struct {
|
||||||
// 外部仓库ID,一个店铺下,同一个外部ID只能创建一个仓库
|
// 外部仓库ID,一个店铺下,同一个外部ID只能创建一个仓库
|
||||||
OutWarehouseId string `json:"out_warehouse_id"`
|
OutWarehouseId string `json:"out_warehouse_id"`
|
||||||
@@ -51,4 +61,12 @@ type WarehouseCreateParam struct {
|
|||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
// 仓库介绍
|
// 仓库介绍
|
||||||
Intro string `json:"intro"`
|
Intro string `json:"intro"`
|
||||||
|
//仓信息
|
||||||
|
Warehouse *Warehouse `json:"warehouse"`
|
||||||
|
}
|
||||||
|
type Warehouse struct {
|
||||||
|
// 仓地址编码 苹果门店店铺、超市小时达店铺建仓必传
|
||||||
|
WarehouseLocation *WarehouseLocation `json:"warehouse_location"`
|
||||||
|
// 仓地址详细地址,苹果门店店铺、超市小时达店铺建仓必传
|
||||||
|
AddressDetail string `json:"address_detail"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ func (a *API) GetShopCategory(cid int64) ([]*RetailCategoryInfo, error) {
|
|||||||
param.Cid = cid
|
param.Cid = cid
|
||||||
result, err := request.Execute(a.accessTokenObj)
|
result, err := request.Execute(a.accessTokenObj)
|
||||||
globals.SugarLogger.Debugf("获取类目id=========:%s", request.GetUrlPath())
|
globals.SugarLogger.Debugf("获取类目id=========:%s", request.GetUrlPath())
|
||||||
globals.SugarLogger.Debugf("获取类目id:=%s", utils.Format4Output(result, false))
|
//globals.SugarLogger.Debugf("获取类目id:=%s", utils.Format4Output(result, false))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ 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"
|
||||||
"strings"
|
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
@@ -278,14 +277,17 @@ 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.Printf("%d", len(tempStr))
|
||||||
for v := len(tempStr) - 1; v >= 0; v-- {
|
|
||||||
s2 := strings.Split(tempStr[v], ",")
|
fmt.Println(float64(120733783) / float64(1000000))
|
||||||
Longitude := utils.Str2Float64(s2[0])
|
fmt.Println(utils.Int64ToFloat64(120733783) / float64(1000000))
|
||||||
Latitude := utils.Str2Float64(s2[1])
|
//for v := len(tempStr) - 1; v >= 0; v-- {
|
||||||
fmt.Printf("%f,%f\n", Longitude, Latitude)
|
// s2 := strings.Split(tempStr[v], ",")
|
||||||
}
|
// Longitude := utils.Str2Float64(s2[0])
|
||||||
|
// Latitude := utils.Str2Float64(s2[1])
|
||||||
|
// fmt.Printf("%f,%f\n", Longitude, Latitude)
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
//运费模板
|
//运费模板
|
||||||
|
|||||||
Reference in New Issue
Block a user