diff --git a/platformapi/tiktok_shop/sdk-golang/api/warehouse_create/request/warehouse_create_request.go b/platformapi/tiktok_shop/sdk-golang/api/warehouse_create/request/warehouse_create_request.go index 3b5722fe..1fb23152 100644 --- a/platformapi/tiktok_shop/sdk-golang/api/warehouse_create/request/warehouse_create_request.go +++ b/platformapi/tiktok_shop/sdk-golang/api/warehouse_create/request/warehouse_create_request.go @@ -44,6 +44,16 @@ func (c *WarehouseCreateRequest) GetParams() *WarehouseCreateParam { 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 { // 外部仓库ID,一个店铺下,同一个外部ID只能创建一个仓库 OutWarehouseId string `json:"out_warehouse_id"` @@ -51,4 +61,12 @@ type WarehouseCreateParam struct { Name string `json:"name"` // 仓库介绍 Intro string `json:"intro"` + //仓信息 + Warehouse *Warehouse `json:"warehouse"` +} +type Warehouse struct { + // 仓地址编码 苹果门店店铺、超市小时达店铺建仓必传 + WarehouseLocation *WarehouseLocation `json:"warehouse_location"` + // 仓地址详细地址,苹果门店店铺、超市小时达店铺建仓必传 + AddressDetail string `json:"address_detail"` } diff --git a/platformapi/tiktok_shop/tiktok_api/sku.go b/platformapi/tiktok_shop/tiktok_api/sku.go index b7af3872..d9b91e7e 100644 --- a/platformapi/tiktok_shop/tiktok_api/sku.go +++ b/platformapi/tiktok_shop/tiktok_api/sku.go @@ -61,7 +61,7 @@ func (a *API) GetShopCategory(cid int64) ([]*RetailCategoryInfo, error) { param.Cid = cid result, err := request.Execute(a.accessTokenObj) 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 { return nil, err } diff --git a/platformapi/tiktok_shop/tiktok_api/store_test.go b/platformapi/tiktok_shop/tiktok_api/store_test.go index cecf156a..de6ec861 100644 --- a/platformapi/tiktok_shop/tiktok_api/store_test.go +++ b/platformapi/tiktok_shop/tiktok_api/store_test.go @@ -18,7 +18,6 @@ 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" - "strings" "testing" "time" ) @@ -278,14 +277,17 @@ 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", ";") + //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)) - 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) - } + + 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) + //} } //运费模板