1
This commit is contained in:
@@ -53,7 +53,7 @@ type LogisticsIndTrackPushParam struct {
|
||||
// 轨迹信息
|
||||
TraceMsgs []TraceMsgList `json:"trace_msgs"`
|
||||
// 未知
|
||||
AuthorityId string `json:"authority_id"`
|
||||
//AuthorityId string `json:"authority_id"`
|
||||
}
|
||||
|
||||
type TraceMsgList struct {
|
||||
|
||||
@@ -110,10 +110,6 @@ func (a *API) RefreshToken() (*doudian_sdk.CreateTokenData, error) {
|
||||
func (a *API) SetToken(token string) {
|
||||
a.locker.Lock()
|
||||
defer a.locker.Unlock()
|
||||
var access *doudian_sdk.AccessToken
|
||||
if err := json.Unmarshal([]byte(token), &access); err != nil {
|
||||
return
|
||||
}
|
||||
a.accessToken = token
|
||||
}
|
||||
|
||||
@@ -123,6 +119,18 @@ func (a *API) SetRefreshToken(token string) {
|
||||
a.refreshToken = token
|
||||
}
|
||||
|
||||
func (a *API) SetExpiresIn(expiresIn int64) {
|
||||
a.locker.Lock()
|
||||
defer a.locker.Unlock()
|
||||
a.expiresIn = expiresIn
|
||||
}
|
||||
|
||||
func (a *API) SetAcctokenObj(acctokenObj *doudian_sdk.AccessToken) {
|
||||
a.locker.Lock()
|
||||
defer a.locker.Unlock()
|
||||
a.accessTokenObj = acctokenObj
|
||||
}
|
||||
|
||||
// GetAppId 获取appid
|
||||
func (a *API) GetAppId() string {
|
||||
a.locker.Lock()
|
||||
|
||||
@@ -103,9 +103,10 @@ func TestOrderStatusAndPsInfo(t *testing.T) {
|
||||
a := NewExpress("7153997323561879075", "3517d3ea-b96b-4379-a7a4-2d9389e8ffeb", "")
|
||||
a.CreateToken()
|
||||
param := make(map[string]interface{}, 0)
|
||||
param["third_carrier_order_id"] = "1412986874296139776"
|
||||
param["logistics_context"] = "骑手送达2"
|
||||
param["courier_name"] = "刘磊"
|
||||
param["courier_phone"] = "18981810340"
|
||||
param["third_carrier_order_id"] = "4995851215059621284"
|
||||
param["logistics_context"] = "呼叫骑手"
|
||||
param["opcode"] = "CALL_RIDER"
|
||||
param["courier_name"] = "徐业圩"
|
||||
param["courier_phone"] = "19817862055"
|
||||
a.OrderStatusAndPsInfo(param)
|
||||
}
|
||||
|
||||
@@ -116,10 +116,10 @@ func (a *APIExpress) OrderStatusAndPsInfo(param map[string]interface{}) error {
|
||||
// 组合参数
|
||||
request := logistics_indTrackPush_reqeust.New()
|
||||
psInfo := &logistics_indTrackPush_reqeust.LogisticsIndTrackPushParam{
|
||||
CurTime: utils.Time2Str(time.Now()),
|
||||
Company: TiktokExpressCode,
|
||||
TraceMsgs: nil,
|
||||
AuthorityId: "",
|
||||
CurTime: utils.Time2Str(time.Now()),
|
||||
Company: TiktokExpressCode,
|
||||
TraceMsgs: nil,
|
||||
//AuthorityId: "",
|
||||
}
|
||||
traceMsgs := make([]logistics_indTrackPush_reqeust.TraceMsgList, 0, 1)
|
||||
traceMsg := logistics_indTrackPush_reqeust.TraceMsgList{
|
||||
@@ -129,7 +129,7 @@ func (a *APIExpress) OrderStatusAndPsInfo(param map[string]interface{}) error {
|
||||
Opcode: param["opcode"].(string),
|
||||
OpTime: utils.Time2Str(time.Now()),
|
||||
Content: param["logistics_context"].(string),
|
||||
ThirdPartyCompany: TiktokExpressCode,
|
||||
ThirdPartyCompany: "dada",
|
||||
ExceptionCode: "",
|
||||
ExceptionDesc: "",
|
||||
CancelCode: "",
|
||||
|
||||
Reference in New Issue
Block a user