store
This commit is contained in:
@@ -2,6 +2,8 @@ package freightTemplate_create_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
freightTemplate_create_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/freightTemplate_create/response"
|
||||
doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
)
|
||||
|
||||
type FreightTemplateCreateRequest struct {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package freightTemplate_create_response
|
||||
|
||||
import doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
|
||||
type FreightTemplateCreateResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *FreightTemplateCreateData `json:"data"`
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
package shop_bindStoreFreight_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
shop_bindStoreFreight_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/shop_bindStoreFreight/response"
|
||||
doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
)
|
||||
|
||||
type ShopBindStoreFreightRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *ShopBindStoreFreightParam
|
||||
}
|
||||
|
||||
func (c *ShopBindStoreFreightRequest) GetUrlPath() string {
|
||||
return "/shop/bindStoreFreight"
|
||||
}
|
||||
|
||||
func New() *ShopBindStoreFreightRequest {
|
||||
request := &ShopBindStoreFreightRequest{
|
||||
Param: &ShopBindStoreFreightParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *ShopBindStoreFreightRequest) Execute(accessToken *doudian_sdk.AccessToken) (*shop_bindStoreFreight_response.ShopBindStoreFreightResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &shop_bindStoreFreight_response.ShopBindStoreFreightResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *ShopBindStoreFreightRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *ShopBindStoreFreightRequest) GetParams() *ShopBindStoreFreightParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type ShopBindStoreFreightParam struct {
|
||||
// 门店IDe
|
||||
StoreId int64 `json:"store_id"`
|
||||
// 运费模版ID
|
||||
FreightId int64 `json:"freight_id"`
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package shop_bindStoreFreight_response
|
||||
|
||||
import (
|
||||
doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
)
|
||||
|
||||
type ShopBindStoreFreightResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *ShopBindStoreFreightData `json:"data"`
|
||||
}
|
||||
type ShopBindStoreFreightData struct {
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package shop_getStoreDetail_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
shop_getStoreDetail_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/shop_getStoreDetail/response"
|
||||
doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
)
|
||||
|
||||
type ShopGetStoreDetailRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *ShopGetStoreDetailParam
|
||||
}
|
||||
|
||||
func (c *ShopGetStoreDetailRequest) GetUrlPath() string {
|
||||
return "/shop/getStoreDetail"
|
||||
}
|
||||
|
||||
func New() *ShopGetStoreDetailRequest {
|
||||
request := &ShopGetStoreDetailRequest{
|
||||
Param: &ShopGetStoreDetailParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *ShopGetStoreDetailRequest) Execute(accessToken *doudian_sdk.AccessToken) (*shop_getStoreDetail_response.ShopGetStoreDetailResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &shop_getStoreDetail_response.ShopGetStoreDetailResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *ShopGetStoreDetailRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *ShopGetStoreDetailRequest) GetParams() *ShopGetStoreDetailParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type ShopGetStoreDetailParam struct {
|
||||
// 门店ID
|
||||
StoreId int64 `json:"store_id"`
|
||||
// 是否需要poi审核信息,注:只要审核状态的审核不要传true,需要详细的提交信息时传true
|
||||
IsNeedPoiAuditInfo bool `json:"is_need_poi_audit_info"`
|
||||
// 是否需要关联的抖店信息,注:只要shopId不要传true,需要关联店铺名称等信息时传true
|
||||
IsNeedRelShopUser bool `json:"is_need_rel_shop_user"`
|
||||
// 是否需要负责人信息
|
||||
IsNeedChargeInfo bool `json:"is_need_charge_info"`
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
package shop_getStoreDetail_response
|
||||
|
||||
import (
|
||||
doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
)
|
||||
|
||||
type ShopGetStoreDetailResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *ShopGetStoreDetailData `json:"data"`
|
||||
}
|
||||
type RelShopUser struct {
|
||||
// 关联店铺ID
|
||||
Id int64 `json:"id"`
|
||||
// 店铺名称
|
||||
ShopName string `json:"shop_name"`
|
||||
// 商家负责人
|
||||
ShopChargeName string `json:"shop_charge_name"`
|
||||
// uid
|
||||
ToutiaoId int64 `json:"toutiao_id"`
|
||||
// 商业化id
|
||||
OceanId int64 `json:"ocean_id"`
|
||||
// 营业状态,0正常营业 1停业整顿
|
||||
OperateStatus int32 `json:"operate_status"`
|
||||
// 业务类型 0二类电商 1放心购
|
||||
BizType int32 `json:"biz_type"`
|
||||
// 资质类型 11个人 41 个体 0企业
|
||||
VType int32 `json:"v_type"`
|
||||
// 店铺类型 0普通,1专营,2专卖,3旗舰
|
||||
ShopType int32 `json:"shop_type"`
|
||||
}
|
||||
type PoiAuditInfo struct {
|
||||
// poi审核id
|
||||
PoiAuditId string `json:"poi_audit_id"`
|
||||
// poi审核子状态:1审核中;2绑定成功;3驳回
|
||||
PoiAuditState int64 `json:"poi_audit_state"`
|
||||
// 门店ID
|
||||
StoreId int64 `json:"store_id"`
|
||||
// 门店名称
|
||||
Name string `json:"name"`
|
||||
// 门店编码
|
||||
StoreCode string `json:"store_code"`
|
||||
// 经度
|
||||
Longitude string `json:"longitude"`
|
||||
// 维度
|
||||
Latitude string `json:"latitude"`
|
||||
// 省
|
||||
Province string `json:"province"`
|
||||
// 市
|
||||
City string `json:"city"`
|
||||
// 区
|
||||
District string `json:"district"`
|
||||
// 详细地址
|
||||
Address string `json:"address"`
|
||||
// 电话
|
||||
Contact string `json:"contact"`
|
||||
// 营业时间
|
||||
OpenTime *OpenTime `json:"open_time"`
|
||||
// 拒绝原因
|
||||
RejectReason string `json:"reject_reason"`
|
||||
// 街道/镇
|
||||
Town string `json:"town"`
|
||||
}
|
||||
type StoreChargeInfo struct {
|
||||
// 负责人姓名
|
||||
ChargeName string `json:"charge_name"`
|
||||
// 负责人电话
|
||||
ChargeMobile string `json:"charge_mobile"`
|
||||
}
|
||||
type StoreDetail struct {
|
||||
// 门店信息
|
||||
Store *Store `json:"store"`
|
||||
// 关联抖店信息
|
||||
RelShopUser *RelShopUser `json:"rel_shop_user"`
|
||||
// poi审核信息
|
||||
PoiAuditInfo *PoiAuditInfo `json:"poi_audit_info"`
|
||||
// 负责人信息
|
||||
StoreChargeInfo *StoreChargeInfo `json:"store_charge_info"`
|
||||
}
|
||||
type ShopGetStoreDetailData struct {
|
||||
// 返回错误码,非0即有错
|
||||
RetCode int64 `json:"ret_code"`
|
||||
// 错误信息
|
||||
RetMsg string `json:"ret_msg"`
|
||||
// 门店信息
|
||||
StoreDetail *StoreDetail `json:"store_detail"`
|
||||
}
|
||||
type OpenTime struct {
|
||||
// key:星期(1:周一、2:周二...7:周日)val:时间(多段用空格分隔,例"08:30-11:00 13:00-17:00")
|
||||
DayMap map[int64]string `json:"day_map"`
|
||||
// 暂时不使用
|
||||
Custom string `json:"custom"`
|
||||
}
|
||||
type Store struct {
|
||||
// 门店ID
|
||||
StoreId int64 `json:"store_id"`
|
||||
// 门店名称
|
||||
Name string `json:"name"`
|
||||
// 门店编码
|
||||
StoreCode string `json:"store_code"`
|
||||
// 关联抖店Id
|
||||
RelShopId int64 `json:"rel_shop_id"`
|
||||
// poiId
|
||||
PoiId int64 `json:"poi_id"`
|
||||
// 经度
|
||||
Longitude string `json:"longitude"`
|
||||
// 维度
|
||||
Latitude string `json:"latitude"`
|
||||
// 省
|
||||
Province string `json:"province"`
|
||||
// 省份code
|
||||
ProvinceCode string `json:"province_code"`
|
||||
// 市
|
||||
City string `json:"city"`
|
||||
// 城市code
|
||||
CityCode string `json:"city_code"`
|
||||
// 区
|
||||
District string `json:"district"`
|
||||
// 区code
|
||||
DistrictCode string `json:"district_code"`
|
||||
// 街道/镇
|
||||
Town string `json:"town"`
|
||||
// 街道/镇code
|
||||
TownCode string `json:"town_code"`
|
||||
// 详细地址
|
||||
Address string `json:"address"`
|
||||
// 联系方式
|
||||
Contact string `json:"contact"`
|
||||
// 营业时间
|
||||
OpenTime *OpenTime `json:"open_time"`
|
||||
// 当前时间是否在营业时间中,如果不在则是打烊中
|
||||
IsOpenNow bool `json:"is_open_now"`
|
||||
// 绑定状态 1绑定中;2绑定成功;3:资质验证中;4账户认证中;5正常营业(c端可下单);6暂停营业
|
||||
State int64 `json:"state"`
|
||||
// poi审核子状态:1审核中;2绑定成功;3驳回
|
||||
PoiAuditState int64 `json:"poi_audit_state"`
|
||||
// 资质审核状态:0未提交;1审核中;2审核通过;3驳回
|
||||
QualState int64 `json:"qual_state"`
|
||||
// 账户验证状态:0未提交;1验证中;2通过;3失败
|
||||
RemitState int64 `json:"remit_state"`
|
||||
// 开户状态:0未开户;1已开户
|
||||
OpenAccountState int64 `json:"open_account_state"`
|
||||
// 停业类型:1商家主动操作;2平台处罚
|
||||
SuspendType int64 `json:"suspend_type"`
|
||||
// 绑定成功的时间
|
||||
BoundTime int64 `json:"bound_time"`
|
||||
// 创建时间
|
||||
CreateTime int64 `json:"create_time"`
|
||||
// 更新时间
|
||||
UpdateTime int64 `json:"update_time"`
|
||||
// 资质验证通过时间
|
||||
QualPassTime int64 `json:"qual_pass_time"`
|
||||
// 账户验证通过时间
|
||||
RemitPassTime int64 `json:"remit_pass_time"`
|
||||
// 变成已开户的时间
|
||||
OpenAccountTime int64 `json:"open_account_time"`
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package shop_getStoreList_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
shop_getStoreList_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/shop_getStoreList/response"
|
||||
doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
)
|
||||
|
||||
type ShopGetStoreListRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *ShopGetStoreListParam
|
||||
}
|
||||
|
||||
func (c *ShopGetStoreListRequest) GetUrlPath() string {
|
||||
return "/shop/getStoreList"
|
||||
}
|
||||
|
||||
func New() *ShopGetStoreListRequest {
|
||||
request := &ShopGetStoreListRequest{
|
||||
Param: &ShopGetStoreListParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *ShopGetStoreListRequest) Execute(accessToken *doudian_sdk.AccessToken) (*shop_getStoreList_response.ShopGetStoreListResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &shop_getStoreList_response.ShopGetStoreListResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *ShopGetStoreListRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *ShopGetStoreListRequest) GetParams() *ShopGetStoreListParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type ShopGetStoreListParam struct {
|
||||
// 门店名称集合,不支持模糊
|
||||
StoreNameList []string `json:"store_name_list"`
|
||||
// 门店id集合,用于查询门店信息
|
||||
StoreIdList []int64 `json:"store_id_list"`
|
||||
// 门店编码,开发者自定义
|
||||
StoreCodeList []string `json:"store_code_list"`
|
||||
// 绑定状态,1绑定中;2绑定成功;3:资质验证中;4账户认证中;5正常营业(c端可下单)
|
||||
State int64 `json:"state"`
|
||||
// poi审核状态:0无提审;1审核中;2审核成功;3驳回
|
||||
PoiAuditState []int64 `json:"poi_audit_state"`
|
||||
// 省
|
||||
Province string `json:"province"`
|
||||
// 市
|
||||
City string `json:"city"`
|
||||
// 区
|
||||
District string `json:"district"`
|
||||
// 门店poiId集合
|
||||
PoiIdList []int64 `json:"poi_id_list"`
|
||||
// 门店名称,支持模糊查询
|
||||
NameFuzzy string `json:"name_fuzzy"`
|
||||
// 门店编码,支持模糊查询
|
||||
StoreCodeFuzzy string `json:"store_code_fuzzy"`
|
||||
// 资质审核状态,0未提交;1审核中;2审核通过;3驳回
|
||||
QualState int64 `json:"qual_state"`
|
||||
// 账户验证状态,0未提交;1验证中;2通过;3失败
|
||||
RemitState int64 `json:"remit_state"`
|
||||
// 开户状态:0未开户;1已开户
|
||||
OpenAccountState int64 `json:"open_account_state"`
|
||||
// 是否需要poi审核信息,注:只要审核状态的审核不要传true,需要详细的提交信息时传true
|
||||
IsNeedPoiAuditInfo bool `json:"is_need_poi_audit_info"`
|
||||
// 是否需要关联的抖店信息,注:只要shopId不要传true,需要关联店铺名称等信息时传true
|
||||
IsNeedRelShopUser bool `json:"is_need_rel_shop_user"`
|
||||
// 第几页(从0开始)
|
||||
Page int64 `json:"page"`
|
||||
// 每页条数
|
||||
PageSize int64 `json:"page_size"`
|
||||
}
|
||||
@@ -0,0 +1,162 @@
|
||||
package shop_getStoreList_response
|
||||
|
||||
import (
|
||||
doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
)
|
||||
|
||||
type ShopGetStoreListResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *ShopGetStoreListData `json:"data"`
|
||||
}
|
||||
type OpenTime_4_4 struct {
|
||||
// 与getStoreDetail接口返回一致
|
||||
DayMap map[int64]string `json:"day_map"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
Custom string `json:"custom"`
|
||||
}
|
||||
type PoiAuditInfo struct {
|
||||
// 与getStoreDetail接口返回一致
|
||||
PoiAuditId string `json:"poi_audit_id"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
PoiAuditState int64 `json:"poi_audit_state"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
StoreId int64 `json:"store_id"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
Name string `json:"name"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
StoreCode string `json:"store_code"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
Longitude string `json:"longitude"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
Latitude string `json:"latitude"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
Province string `json:"province"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
City string `json:"city"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
District string `json:"district"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
Address string `json:"address"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
Contact string `json:"contact"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
OpenTime *OpenTime_4_4 `json:"open_time"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
RejectReason string `json:"reject_reason"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
Town string `json:"town"`
|
||||
}
|
||||
type StoreChargeInfo struct {
|
||||
// 与getStoreDetail接口返回一致
|
||||
ChargeName string `json:"charge_name"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
ChargeMobile string `json:"charge_mobile"`
|
||||
}
|
||||
type StoreDetailListItem struct {
|
||||
// 与getStoreDetail接口返回一致
|
||||
Store *Store `json:"store"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
RelShopUser *RelShopUser `json:"rel_shop_user"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
PoiAuditInfo *PoiAuditInfo `json:"poi_audit_info"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
StoreChargeInfo *StoreChargeInfo `json:"store_charge_info"`
|
||||
}
|
||||
type ShopGetStoreListData struct {
|
||||
// 返回错误码
|
||||
RetCode int64 `json:"ret_code"`
|
||||
// 返回信息
|
||||
RetMsg string `json:"ret_msg"`
|
||||
// 总数
|
||||
Total int64 `json:"total"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
StoreDetailList []StoreDetailListItem `json:"store_detail_list"`
|
||||
}
|
||||
type OpenTime struct {
|
||||
// 与getStoreDetail接口返回一致
|
||||
DayMap map[int64]string `json:"day_map"`
|
||||
}
|
||||
type Store struct {
|
||||
// 与getStoreDetail接口返回一致
|
||||
StoreId int64 `json:"store_id"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
Name string `json:"name"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
StoreCode string `json:"store_code"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
RelShopId int64 `json:"rel_shop_id"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
PoiId int64 `json:"poi_id"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
Longitude string `json:"longitude"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
Latitude string `json:"latitude"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
Province string `json:"province"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
ProvinceCode string `json:"province_code"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
City string `json:"city"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
CityCode string `json:"city_code"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
District string `json:"district"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
DistrictCode string `json:"district_code"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
Town string `json:"town"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
TownCode string `json:"town_code"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
Address string `json:"address"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
Contact string `json:"contact"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
OpenTime *OpenTime `json:"open_time"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
IsOpenNow bool `json:"is_open_now"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
State int64 `json:"state"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
PoiAuditState int64 `json:"poi_audit_state"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
QualState int64 `json:"qual_state"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
RemitState int64 `json:"remit_state"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
OpenAccountState int64 `json:"open_account_state"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
SuspendType int64 `json:"suspend_type"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
BoundTime int64 `json:"bound_time"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
CreateTime int64 `json:"create_time"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
UpdateTime int64 `json:"update_time"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
QualPassTime int64 `json:"qual_pass_time"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
RemitPassTime int64 `json:"remit_pass_time"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
OpenAccountTime int64 `json:"open_account_time"`
|
||||
}
|
||||
type RelShopUser struct {
|
||||
// 与getStoreDetail接口返回一致
|
||||
Id int64 `json:"id"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
ShopName string `json:"shop_name"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
ShopChargeName string `json:"shop_charge_name"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
ToutiaoId int64 `json:"toutiao_id"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
OceanId int64 `json:"ocean_id"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
OperateStatus int32 `json:"operate_status"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
BizType int32 `json:"biz_type"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
VType int32 `json:"v_type"`
|
||||
// 与getStoreDetail接口返回一致
|
||||
ShopType int32 `json:"shop_type"`
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package warehouse_bindFences_request
|
||||
|
||||
import (
|
||||
"doudian.com/open/sdk_golang/api/warehouse_bindFences/response"
|
||||
"doudian.com/open/sdk_golang/core"
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
type WarehouseBindFencesRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *WarehouseBindFencesParam
|
||||
}
|
||||
func (c *WarehouseBindFencesRequest) GetUrlPath() string{
|
||||
return "/warehouse/bindFences"
|
||||
}
|
||||
|
||||
|
||||
func New() *WarehouseBindFencesRequest{
|
||||
request := &WarehouseBindFencesRequest{
|
||||
Param: &WarehouseBindFencesParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
|
||||
func (c *WarehouseBindFencesRequest) Execute(accessToken *doudian_sdk.AccessToken) (*warehouse_bindFences_response.WarehouseBindFencesResponse, error){
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &warehouse_bindFences_response.WarehouseBindFencesResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
|
||||
func (c *WarehouseBindFencesRequest) GetParamObject() interface{}{
|
||||
return c.Param
|
||||
}
|
||||
|
||||
|
||||
func (c *WarehouseBindFencesRequest) GetParams() *WarehouseBindFencesParam{
|
||||
return c.Param
|
||||
}
|
||||
|
||||
|
||||
type WarehouseBindFencesParam struct {
|
||||
// 外部仓id
|
||||
OutWarehouseId string `json:"out_warehouse_id"`
|
||||
// 外部电子围栏id列表
|
||||
OutFenceIds []string `json:"out_fence_ids"`
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package warehouse_bindFences_response
|
||||
|
||||
import (
|
||||
"doudian.com/open/sdk_golang/core"
|
||||
)
|
||||
|
||||
type WarehouseBindFencesResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *WarehouseBindFencesData `json:"data"`
|
||||
}
|
||||
type WarehouseBindFencesData struct {
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package warehouse_bindFencesByStore_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
warehouse_bindFencesByStore_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/warehouse_bindFencesByStore/response"
|
||||
doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
)
|
||||
|
||||
type WarehouseBindFencesByStoreRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *WarehouseBindFencesByStoreParam
|
||||
}
|
||||
|
||||
func (c *WarehouseBindFencesByStoreRequest) GetUrlPath() string {
|
||||
return "/warehouse/bindFencesByStore"
|
||||
}
|
||||
|
||||
func New() *WarehouseBindFencesByStoreRequest {
|
||||
request := &WarehouseBindFencesByStoreRequest{
|
||||
Param: &WarehouseBindFencesByStoreParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *WarehouseBindFencesByStoreRequest) Execute(accessToken *doudian_sdk.AccessToken) (*warehouse_bindFencesByStore_response.WarehouseBindFencesByStoreResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &warehouse_bindFencesByStore_response.WarehouseBindFencesByStoreResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *WarehouseBindFencesByStoreRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *WarehouseBindFencesByStoreRequest) GetParams() *WarehouseBindFencesByStoreParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type WarehouseBindFencesByStoreParam struct {
|
||||
// 门店id
|
||||
StoreId int64 `json:"store_id"`
|
||||
// 要添加的外部围栏id列表
|
||||
AddOutFenceIds []string `json:"add_out_fence_ids"`
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package warehouse_bindFencesByStore_response
|
||||
|
||||
import (
|
||||
doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
)
|
||||
|
||||
type WarehouseBindFencesByStoreResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *WarehouseBindFencesByStoreData `json:"data"`
|
||||
}
|
||||
type WarehouseBindFencesByStoreData struct {
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package warehouse_bindStore_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
warehouse_bindStore_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/warehouse_bindStore/response"
|
||||
doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
)
|
||||
|
||||
type WarehouseBindStoreRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *WarehouseBindStoreParam
|
||||
}
|
||||
|
||||
func (c *WarehouseBindStoreRequest) GetUrlPath() string {
|
||||
return "/warehouse/bindStore"
|
||||
}
|
||||
|
||||
func New() *WarehouseBindStoreRequest {
|
||||
request := &WarehouseBindStoreRequest{
|
||||
Param: &WarehouseBindStoreParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *WarehouseBindStoreRequest) Execute(accessToken *doudian_sdk.AccessToken) (*warehouse_bindStore_response.WarehouseBindStoreResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &warehouse_bindStore_response.WarehouseBindStoreResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *WarehouseBindStoreRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *WarehouseBindStoreRequest) GetParams() *WarehouseBindStoreParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type WarehouseBindStoreParam struct {
|
||||
// 要添加的门店id列表
|
||||
StoreIds []int64 `json:"store_ids"`
|
||||
// 外部仓id列表
|
||||
OutWarehouseId string `json:"out_warehouse_id"`
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package warehouse_bindStore_response
|
||||
|
||||
import (
|
||||
doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
)
|
||||
|
||||
type WarehouseBindStoreResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *WarehouseBindStoreData `json:"data"`
|
||||
}
|
||||
type WarehouseBindStoreData struct {
|
||||
}
|
||||
@@ -2,6 +2,8 @@ package warehouse_create_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
warehouse_create_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/warehouse_create/response"
|
||||
doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
)
|
||||
|
||||
type WarehouseCreateRequest struct {
|
||||
|
||||
@@ -2,6 +2,8 @@ package warehouse_createBatch_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
warehouse_createBatch_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/warehouse_createBatch/response"
|
||||
doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
)
|
||||
|
||||
type WarehouseCreateBatchRequest struct {
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
package warehouse_createFence_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
warehouse_createFence_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/warehouse_createFence/response"
|
||||
doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
)
|
||||
|
||||
type WarehouseCreateFenceRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *WarehouseCreateFenceParam
|
||||
}
|
||||
|
||||
func (c *WarehouseCreateFenceRequest) GetUrlPath() string {
|
||||
return "/warehouse/createFence"
|
||||
}
|
||||
|
||||
func New() *WarehouseCreateFenceRequest {
|
||||
request := &WarehouseCreateFenceRequest{
|
||||
Param: &WarehouseCreateFenceParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *WarehouseCreateFenceRequest) Execute(accessToken *doudian_sdk.AccessToken) (*warehouse_createFence_response.WarehouseCreateFenceResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &warehouse_createFence_response.WarehouseCreateFenceResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *WarehouseCreateFenceRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *WarehouseCreateFenceRequest) GetParams() *WarehouseCreateFenceParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type WarehouseCreateFenceParam struct {
|
||||
// 围栏信息
|
||||
FenceInfo *FenceInfo `json:"fence_info"`
|
||||
}
|
||||
type Center struct {
|
||||
// 经度
|
||||
Longitude float64 `json:"longitude"`
|
||||
// 纬度
|
||||
Latitude float64 `json:"latitude"`
|
||||
}
|
||||
type VerticesItem struct {
|
||||
// 经度
|
||||
Longitude float64 `json:"longitude"`
|
||||
// 纬度
|
||||
Latitude float64 `json:"latitude"`
|
||||
}
|
||||
type Outer 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. 圆 使用circular 2:多边形,使用polygon 3:带洞多边形(兼容普通多边形),使用polygon_new 4:多个多边形,兼容带洞和不带洞,使用multi_polygons
|
||||
Shape int32 `json:"shape"`
|
||||
// 形状为圆的经纬度信息,对应shape=1
|
||||
Circular *Circular `json:"circular"`
|
||||
// 普通多边形 ,对应shape=2
|
||||
Polygon *Polygon `json:"polygon"`
|
||||
// 带洞多边形,可兼容普通多边形 ,对应shape=3
|
||||
PolygonNew *PolygonNew `json:"polygon_new"`
|
||||
// 多个多边形 ,对应shape=4
|
||||
MultiPolygons []MultiPolygonsItem `json:"multi_polygons"`
|
||||
}
|
||||
type Circular struct {
|
||||
// 圆的中心经纬度
|
||||
Center *Center `json:"center"`
|
||||
// 半径,单位 米
|
||||
Radius float64 `json:"radius"`
|
||||
}
|
||||
type Polygon struct {
|
||||
// 多边形顶点的经纬度:逆时针
|
||||
Vertices []VerticesItem `json:"vertices"`
|
||||
}
|
||||
type InnerItem struct {
|
||||
// 经纬度列表,内圈为顺时针
|
||||
Vertices []VerticesItem `json:"vertices"`
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package warehouse_createFence_response
|
||||
|
||||
import (
|
||||
doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
)
|
||||
|
||||
type WarehouseCreateFenceResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *WarehouseCreateFenceData `json:"data"`
|
||||
}
|
||||
type WarehouseCreateFenceData struct {
|
||||
// 内部围栏id
|
||||
FenceId string `json:"fence_id"`
|
||||
}
|
||||
Reference in New Issue
Block a user