1
This commit is contained in:
@@ -0,0 +1,90 @@
|
||||
package logistics_indTrackPush_reqeust
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
logistics_indTrackPush_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/logistics_indTrackPush/response"
|
||||
doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
)
|
||||
|
||||
type LogisticsIndTrackPushRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *LogisticsIndTrackPushParam
|
||||
}
|
||||
|
||||
// GetUrlPath 同步配送坐标,配送轨迹推送
|
||||
func (c *LogisticsIndTrackPushRequest) GetUrlPath() string {
|
||||
return "/logistics/indTrackPush"
|
||||
}
|
||||
|
||||
func New() *LogisticsIndTrackPushRequest {
|
||||
request := &LogisticsIndTrackPushRequest{
|
||||
Param: &LogisticsIndTrackPushParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsIndTrackPushRequest) Execute(accessToken *doudian_sdk.AccessToken) (*logistics_indTrackPush_response.LogisticsIndTrackPushResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &logistics_indTrackPush_response.LogisticsIndTrackPushResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsIndTrackPushRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *LogisticsIndTrackPushRequest) GetParams() *LogisticsIndTrackPushParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type LogisticsIndTrackPushParam struct {
|
||||
// 请求时间
|
||||
CurTime string `json:"cur_time"`
|
||||
// 公司编码
|
||||
Company string `json:"company"`
|
||||
// 轨迹信息
|
||||
TraceMsgs []TraceMsgList `json:"trace_msgs"`
|
||||
// 未知
|
||||
AuthorityId string `json:"authority_id"`
|
||||
}
|
||||
|
||||
type TraceMsgList struct {
|
||||
// 运单号
|
||||
TrackNo string `json:"track_no"`
|
||||
// 轨迹列表
|
||||
Traces []TracesList `json:"traces"`
|
||||
}
|
||||
|
||||
type TracesList struct {
|
||||
// 事件编码
|
||||
Opcode string `json:"opcode"`
|
||||
// 时间操作时间
|
||||
OpTime string `json:"op_time"`
|
||||
// 文案
|
||||
Content string `json:"content"`
|
||||
// 骑手信息
|
||||
Rider ReiderInfo `json:"rider"`
|
||||
// 三方运力公司,顺丰同城 sftc 闪送 shansong 达达 dada UU uupt 美团 meituan 蜂鸟 fengniao
|
||||
ThirdPartyCompany string `json:"third_party_company"`
|
||||
// 异常编码
|
||||
ExceptionCode string `json:"exception_code"`
|
||||
// 异常原因
|
||||
ExceptionDesc string `json:"exception_desc"`
|
||||
// 取消编码
|
||||
CancelCode string `json:"cancel_code"`
|
||||
// 取消原因
|
||||
CancelDesc string `json:"cancel_desc"`
|
||||
}
|
||||
|
||||
type ReiderInfo struct {
|
||||
Name string `json:"name"` // 骑手姓名
|
||||
Mobile string `json:"mobile"` // 骑手电话号码
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package logistics_indTrackPush_response
|
||||
|
||||
import (
|
||||
doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
)
|
||||
|
||||
type LogisticsIndTrackPushResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *LogisticsIndTrackPushData `json:"data"`
|
||||
}
|
||||
type LogisticsIndTrackPushData struct {
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package logistics_indTrackRegister_reqeust
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
logistics_indTrackRegister_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/logistics_indTrackRegister/response"
|
||||
doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
)
|
||||
|
||||
type LogisticsIndTrackRegisterRequest struct {
|
||||
doudian_sdk.BaseDoudianOpApiRequest
|
||||
Param *LogisticsIndTrackRegisterRequestParam
|
||||
}
|
||||
|
||||
// GetUrlPath 根据即时配单号和公司编码订阅轨迹,用于即时配服务商推送轨迹
|
||||
func (c *LogisticsIndTrackRegisterRequest) GetUrlPath() string {
|
||||
return "/logistics/ind/track/register"
|
||||
}
|
||||
|
||||
func New() *LogisticsIndTrackRegisterRequest {
|
||||
request := &LogisticsIndTrackRegisterRequest{
|
||||
Param: &LogisticsIndTrackRegisterRequestParam{},
|
||||
}
|
||||
request.SetConfig(doudian_sdk.GlobalConfig)
|
||||
request.SetClient(doudian_sdk.DefaultDoudianOpApiClient)
|
||||
return request
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsIndTrackRegisterRequest) Execute(accessToken *doudian_sdk.AccessToken) (*logistics_indTrackRegister_response.LogisticsIndTrackRegisterRequestResponse, error) {
|
||||
responseJson, err := c.GetClient().Request(c, accessToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
response := &logistics_indTrackRegister_response.LogisticsIndTrackRegisterRequestResponse{}
|
||||
_ = json.Unmarshal([]byte(responseJson), response)
|
||||
return response, nil
|
||||
|
||||
}
|
||||
|
||||
func (c *LogisticsIndTrackRegisterRequest) GetParamObject() interface{} {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
func (c *LogisticsIndTrackRegisterRequest) GetParams() *LogisticsIndTrackRegisterRequestParam {
|
||||
return c.Param
|
||||
}
|
||||
|
||||
type LogisticsIndTrackRegisterRequestParam struct {
|
||||
// 运单号
|
||||
TrackNo string `json:"track_no"`
|
||||
// 回调地址
|
||||
CallbackUrl string `json:"callback_url"`
|
||||
// 物流商编码
|
||||
Company string `json:"company"`
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package logistics_indTrackRegister_response
|
||||
|
||||
import (
|
||||
doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
)
|
||||
|
||||
type LogisticsIndTrackRegisterRequestResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *LogisticsIndTrackRegisterRequestData `json:"data"`
|
||||
}
|
||||
|
||||
type LogisticsIndTrackRegisterRequestData struct {
|
||||
Result bool `json:"result"` // 请求结果
|
||||
ReturnCode string `json:"return_code"` // 响应码
|
||||
Message string `json:"message"` // 错误消息
|
||||
}
|
||||
@@ -2,6 +2,8 @@ package token_create_request
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
token_create_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/token_create/response"
|
||||
doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
)
|
||||
|
||||
type TokenCreateRequest struct {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package token_create_response
|
||||
|
||||
import doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core"
|
||||
|
||||
type TokenCreateResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *TokenCreateData `json:"data"`
|
||||
|
||||
Reference in New Issue
Block a user