1
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package freightTemplate_update_response
|
||||
|
||||
import doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
|
||||
type FreightTemplateUpdateResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *FreightTemplateUpdateData `json:"data"`
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
package warehouse_setFence_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
warehouse_setFence_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/warehouse_setFence/response"
|
||||
doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
)
|
||||
|
||||
type WarehouseSetFenceRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *WarehouseSetFenceParam
|
||||
}
|
||||
|
||||
func (c *WarehouseSetFenceRequest) GetUrlPath() string {
|
||||
return "/warehouse/setFence"
|
||||
}
|
||||
|
||||
func New() *WarehouseSetFenceRequest {
|
||||
request := &WarehouseSetFenceRequest{
|
||||
Param: &WarehouseSetFenceParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *WarehouseSetFenceRequest) Execute(accessToken *doudian_sdk.AccessToken) (*warehouse_setFence_response.WarehouseSetFenceResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &warehouse_setFence_response.WarehouseSetFenceResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *WarehouseSetFenceRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *WarehouseSetFenceRequest) GetParams() *WarehouseSetFenceParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type VerticesItem struct {
|
||||
// 经度
|
||||
Longitude float64 `json:"longitude"`
|
||||
// 纬度
|
||||
Latitude float64 `json:"latitude"`
|
||||
}
|
||||
type Polygon struct {
|
||||
// 多边形顶点的经纬度:逆时针
|
||||
Vertices []VerticesItem `json:"vertices"`
|
||||
}
|
||||
type PolygonsItem struct {
|
||||
// 多边形顶点
|
||||
Vertices []VerticesItem `json:"vertices"`
|
||||
}
|
||||
type Outer struct {
|
||||
// 经纬度列表,外圈为逆时针
|
||||
Vertices []VerticesItem `json:"vertices"`
|
||||
}
|
||||
type WarehouseSetFenceParam struct {
|
||||
// 围栏信息
|
||||
FenceInfo *FenceInfo `json:"fence_info"`
|
||||
}
|
||||
type Center struct {
|
||||
// 经度
|
||||
Longitude float64 `json:"longitude"`
|
||||
// 纬度
|
||||
Latitude float64 `json:"latitude"`
|
||||
}
|
||||
type Circular struct {
|
||||
// 圆的中心经纬度
|
||||
Center *Center `json:"center"`
|
||||
// 半径,单位 米
|
||||
Radius float64 `json:"radius"`
|
||||
}
|
||||
type InnerItem struct {
|
||||
// 经纬度列表,内圈为顺时针
|
||||
Vertices []VerticesItem `json:"vertices"`
|
||||
}
|
||||
type PolygonNew struct {
|
||||
// 带洞多边形的外圈数据
|
||||
Outer *Outer `json:"outer"`
|
||||
// 带洞多边形的内圈数据,空表示普通多边形
|
||||
Inner []InnerItem `json:"inner"`
|
||||
}
|
||||
type MultiPolygonsItem struct {
|
||||
// 带洞多边形的外圈数据
|
||||
Outer *Outer `json:"outer"`
|
||||
// 带洞多边形的内圈数据,空表示普通多边形
|
||||
Inner []InnerItem `json:"inner"`
|
||||
}
|
||||
type FenceInfo struct {
|
||||
// 外部围栏id,必传
|
||||
OutFenceId string `json:"out_fence_id"`
|
||||
// 形状 1. 圆 2:多边形 3:带洞多边形(兼容普通多边形)4:多个多边形,兼容带洞和不带洞
|
||||
Shape int32 `json:"shape"`
|
||||
// 形状为圆的经纬度信息
|
||||
Circular *Circular `json:"circular"`
|
||||
// 普通多边形
|
||||
Polygon *Polygon `json:"polygon"`
|
||||
// 带洞多边形,可兼容普通多边形
|
||||
Polygons []PolygonsItem `json:"polygons"`
|
||||
// 带洞多边形,可兼容普通多边形
|
||||
PolygonNew *PolygonNew `json:"polygon_new"`
|
||||
// 多个多边形
|
||||
MultiPolygons []MultiPolygonsItem `json:"multi_polygons"`
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package warehouse_setFence_response
|
||||
|
||||
import (
|
||||
doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
)
|
||||
|
||||
type WarehouseSetFenceResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *WarehouseSetFenceData `json:"data"`
|
||||
}
|
||||
type WarehouseSetFenceData struct {
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package warehouse_unbindStore_request
|
||||
|
||||
import (
|
||||
"doudian.com/open/sdk_golang/api/warehouse_unbindStore/response"
|
||||
"doudian.com/open/sdk_golang/core"
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type WarehouseUnbindStoreRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *WarehouseUnbindStoreParam
|
||||
}
|
||||
func (c *WarehouseUnbindStoreRequest) GetUrlPath() string{
|
||||
return "/warehouse/unbindStore"
|
||||
}
|
||||
|
||||
|
||||
func New() *WarehouseUnbindStoreRequest{
|
||||
request := &WarehouseUnbindStoreRequest{
|
||||
Param: &WarehouseUnbindStoreParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
|
||||
func (c *WarehouseUnbindStoreRequest) Execute(accessToken *doudian_sdk.AccessToken) (*warehouse_unbindStore_response.WarehouseUnbindStoreResponse, error){
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &warehouse_unbindStore_response.WarehouseUnbindStoreResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
|
||||
func (c *WarehouseUnbindStoreRequest) GetParamObject() interface{}{
|
||||
return c.Param
|
||||
}
|
||||
|
||||
|
||||
func (c *WarehouseUnbindStoreRequest) GetParams() *WarehouseUnbindStoreParam{
|
||||
return c.Param
|
||||
}
|
||||
|
||||
|
||||
type WarehouseUnbindStoreParam struct {
|
||||
// 要删除的门店id列表
|
||||
StoreIds []int64 `json:"store_ids"`
|
||||
// 外部仓id
|
||||
OutWarehouseId string `json:"out_warehouse_id"`
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package warehouse_unbindStore_response
|
||||
|
||||
import (
|
||||
"doudian.com/open/sdk_golang/core"
|
||||
)
|
||||
|
||||
type WarehouseUnbindStoreResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *WarehouseUnbindStoreData `json:"data"`
|
||||
}
|
||||
type WarehouseUnbindStoreData struct {
|
||||
}
|
||||
Reference in New Issue
Block a user