1
This commit is contained in:
@@ -2,6 +2,8 @@ package tiktok_api
|
||||
|
||||
import (
|
||||
"errors"
|
||||
address_create_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/address_create/request"
|
||||
address_create_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/address_create/response"
|
||||
shop_batchCreateStore_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/shop_batchCreateStore/request"
|
||||
shop_batchCreateStore_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/shop_batchCreateStore/response"
|
||||
shop_bindStoreSaleLimit_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/shop_bindStoreSaleLimit/request"
|
||||
@@ -147,6 +149,29 @@ func (a *API) BindStoreSaleLimit(info BindBindStoreSaleLimitReq) (*shop_bindStor
|
||||
}
|
||||
|
||||
//门店新增查询发货地址
|
||||
func AddressCreate() {
|
||||
|
||||
func (a *API) AddressCreate(info CreateAddressReq) (*address_create_response.AddressCreateData, error) {
|
||||
request := address_create_request.New()
|
||||
request.Param = &address_create_request.AddressCreateParam{
|
||||
Address: &address_create_request.Address{
|
||||
UserName: info.Address.UserName,
|
||||
Mobile: info.Address.Mobile,
|
||||
ProvinceId: info.Address.ProvinceId,
|
||||
CityId: info.Address.CityId,
|
||||
TownId: info.Address.TownId,
|
||||
Detail: info.Address.Detail,
|
||||
StreetId: info.Address.StreetId,
|
||||
LinkType: info.Address.LinkType,
|
||||
FixedPhone: info.Address.FixedPhone,
|
||||
Remark: info.Address.Remark,
|
||||
},
|
||||
StoreId: info.StoreId,
|
||||
}
|
||||
response, err := request.Execute(AccessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if response.Code != 1000 {
|
||||
return nil, errors.New(response.Msg)
|
||||
}
|
||||
return response.Data, nil
|
||||
}
|
||||
|
||||
@@ -31,6 +31,11 @@ const (
|
||||
TradeLimitSubjectReceivingMobile = 5 //收件电话
|
||||
TradeLimitSubjectIDCard = 6 //身份证号
|
||||
TradeLimitSubjectPayAccount = 7 //支付账号
|
||||
|
||||
//联系方式类型
|
||||
LinkTypePhone = 0 //手机
|
||||
LinkTypeOrdinary = 1 //普通座机
|
||||
LinkTypeEnterprise = 2 //企业座机
|
||||
)
|
||||
|
||||
//门店信息
|
||||
@@ -177,3 +182,21 @@ type BindBindStoreSaleLimitReq struct {
|
||||
StoreID int64 `json:"store_id"` //门店ID
|
||||
SaleLimitID int64 `json:"sale_limit_id"` //限售模板ID
|
||||
}
|
||||
|
||||
//创建店铺地址库
|
||||
type CreateAddressReq struct {
|
||||
Address *Address `json:"address"` // 地址信息
|
||||
StoreId int64 `json:"store_id"` // 门店ID(新建地址绑定在该门店下,非门店场景无需填写)
|
||||
}
|
||||
type Address struct {
|
||||
UserName string `json:"user_name"` // 联系人姓名
|
||||
Mobile string `json:"mobile"` // 手机号码
|
||||
ProvinceId int64 `json:"province_id"` // 省份ID
|
||||
CityId int64 `json:"city_id"` // 城市ID
|
||||
TownId int64 `json:"town_id"` // 区ID
|
||||
Detail string `json:"detail"` // 详细地址
|
||||
StreetId int64 `json:"street_id"` // 街道ID
|
||||
LinkType int32 `json:"link_type"` // 联系方式类型(0-手机,1-普通座机,2-企业座机)
|
||||
FixedPhone string `json:"fixed_phone"` // 普通座机格式:区号-座机号-分机号(分机号选填)、区号3~4位、座机号7~8位、分机号不超过5位。企业座机:400/800开头不超过10位、95开头在5~8we
|
||||
Remark string `json:"remark"` // 售后备注
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user