This commit is contained in:
邹宗楠
2023-09-26 15:35:46 +08:00
parent 1265658cbd
commit 6720bce901
3 changed files with 9 additions and 6 deletions

View File

@@ -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)
// 查询售后单详情

View File

@@ -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
}

View File

@@ -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) {