1
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
var token = `{"access_token":"4a543151-f8fd-43d5-9c34-d19fe11fc51c","expires_in":1694069036,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"5a2aaca1-42f7-4b83-9358-8ed5d1d4bcd6","authority_id":""}`
|
||||
var token = `{"access_token":"719db06b-3fbf-461b-8cf2-e5ae70293cdc","expires_in":1695876413,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"8c478de3-8fbd-4535-a78c-06792b8a20a4","authority_id":""}`
|
||||
var a = New("7267745202649957900", "51998fcf-d521-4553-8c0c-fa662c8dbd6e", token)
|
||||
|
||||
// 查询售后单详情
|
||||
|
||||
@@ -144,7 +144,7 @@ func (a *API) GetShipmentInfo(shopOrderID, afterSaleID, shipmentType int64) (*su
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if strings.Contains(response.SubMsg, "当前查询单据不存在:订单不存在") || strings.Contains(response.SubMsg, "未找到当前物流订单, LO") {
|
||||
if strings.Contains(response.SubMsg, "订单不存在") || strings.Contains(response.SubMsg, "未找到当前物流订单, LO") {
|
||||
return &superm_getShipmentInfo_response.ShipmentInfo{
|
||||
ShopOrderID: shopOrderID,
|
||||
AfterSaleID: 0,
|
||||
@@ -160,9 +160,6 @@ func (a *API) GetShipmentInfo(shopOrderID, afterSaleID, shipmentType int64) (*su
|
||||
}, nil
|
||||
}
|
||||
|
||||
if response.Code != RequestSuccessCode {
|
||||
return nil, errors.New(response.SubMsg + ":" + response.LogId)
|
||||
}
|
||||
return response.Data.ShipmentInfo, err
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@ package tiktok_api
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-print/globals"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@@ -37,7 +39,11 @@ func Test(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetShipmentInfo(t *testing.T) {
|
||||
a.GetShipmentInfo(6921428072500696298, 0, ShipmentTypeInvoice)
|
||||
var token = `{"access_token":"719db06b-3fbf-461b-8cf2-e5ae70293cdc","expires_in":1695876413,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"8c478de3-8fbd-4535-a78c-06792b8a20a4","authority_id":""}`
|
||||
var a = New("7267745202649957900", "51998fcf-d521-4553-8c0c-fa662c8dbd6e", token)
|
||||
data, err := a.GetShipmentInfo(6922112012008166892, 0, ShipmentTypeInvoice)
|
||||
globals.SugarLogger.Debugf("======data := %s", utils.Format4Output(data, false))
|
||||
globals.SugarLogger.Debugf("======data := %s", utils.Format4Output(err, false))
|
||||
}
|
||||
|
||||
func TestGetStoreAutoCallRiderInfo(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user