This commit is contained in:
邹宗楠
2023-02-02 09:22:56 +08:00
parent 91a71c12dc
commit a4ace51d7f
7 changed files with 39 additions and 12 deletions

View File

@@ -18,7 +18,7 @@ import (
// "authority_id": ""
//}`
var token = `{"access_token":"adea9f19-9f8d-4656-8eb3-03c91385252f","expires_in":1673237952,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"ab14e321-1a68-405c-b904-7c4c14222c58","authority_id":""}`
var token = `{"access_token":"067cd47f-fa07-464f-a474-066a2351f9f0","expires_in":1675644618,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"99575e32-6c75-41ec-8df0-98470e8c0402","authority_id":""}`
//var token = `{"access_token":"e3173e9f-266f-4d87-88e7-e7cd837bc9d9","expires_in":1672882632,"scope":"SCOPE","shop_id":68023619,"shop_name":"京西到家","refresh_token":"5070aae2-493f-46bd-b5d6-6ea0cd64729f","authority_id":""}`

View File

@@ -16,6 +16,7 @@ import (
superm_setStoreAutoCallRider_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_setStoreAutoCallRider/request"
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/globals"
"strings"
)
// /superm/getDispatcherInfo 运力呼叫询价/运力取消询价(正向)
@@ -148,6 +149,23 @@ func (a *API) GetShipmentInfo(shopOrderID, afterSaleID, shipmentType int64) (*su
if err != nil {
return nil, err
}
if strings.Contains(response.SubMsg, "当前查询单据不存在:订单不存在") {
return &superm_getShipmentInfo_response.ShipmentInfo{
ShopOrderID: shopOrderID,
AfterSaleID: 0,
TrackNo: "",
ShopID: 0,
ShipmentStatus: 0,
ShipmentError: 0,
RiderName: "",
RiderPhone: "",
RiderLongitude: "",
RiderLatitude: "",
OccurredTime: "",
}, err
}
if response.Code != RequestSuccessCode {
return nil, errors.New(response.SubMsg)
}

View File

@@ -23,15 +23,15 @@ const (
)
const (
ShipmentStatusCalling = 1
ShipmentStatusReceived = 2
ShipmentStatusArrived = 3
ShipmentStatusDelivering = 4
ShipmentStatusRejected = 5
ShipmentStatusReturning = 6
ShipmentStatusReturned = 7
ShipmentStatusDelivered = 8
ShipmentStatusCanceled = 9
ShipmentStatusCalling = 1 // 骑手呼叫中
ShipmentStatusReceived = 2 // 骑手已接单
ShipmentStatusArrived = 3 // 骑手已到取货点
ShipmentStatusDelivering = 4 // 骑手已取货
ShipmentStatusRejected = 5 // 骑手配送中
ShipmentStatusReturning = 6 // 收货人已拒收
ShipmentStatusReturned = 7 // 返回中
ShipmentStatusDelivered = 8 // 返回完成
ShipmentStatusCanceled = 9 // 订单妥投
)
var ShipmentStatus = map[int64]string{

View File

@@ -34,3 +34,7 @@ func Test(t *testing.T) {
fmt.Println(50&2, 3&2)
fmt.Println(50|2, 3|2)
}
func TestGetShipmentInfo(t *testing.T) {
a.GetShipmentInfo(5030006277901491620, 0, ShipmentTypeInvoice)
}