1
This commit is contained in:
@@ -2,7 +2,6 @@ package jdapi
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
@@ -369,7 +368,6 @@ func (a *API) ChangeShopCategoryOrder(pid int64, childIds []int64) error {
|
||||
KeyChildIds: childIds,
|
||||
}
|
||||
_, err := a.AccessAPINoPage("pms/changeShopCategoryOrder", params, nil, nil, nullResultParser)
|
||||
globals.SugarLogger.Debugf("changeShopCategoryOrder === %v", err)
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
@@ -32,6 +32,11 @@ func TestQueryCategoriesByOrgCode(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestChangeShopCategoryOrder(t *testing.T) {
|
||||
var aa = []int64{6836731, 6836749, 6836718, 6836757, 6836770, 6836779, 6836719, 6836720, 6836721, 6836722, 6836793, 6836937, 6836723, 6836724, 6836794, 6836839, 6836725, 6836796, 6836726, 6836797, 6836798, 6836799, 6836727, 6836840, 6836940, 6836800, 6836801, 6836802, 6837303}
|
||||
api.ChangeShopCategoryOrder(0, aa)
|
||||
}
|
||||
|
||||
//
|
||||
//func TestQueryChildCategoriesForOP(t *testing.T) {
|
||||
// result, err := api.QueryChildCategoriesForOP(0)
|
||||
|
||||
@@ -6,6 +6,8 @@ type SupermGetShipmentInfoResponse struct {
|
||||
doudian_sdk.BaseDoudianOpApiResponse
|
||||
Data *SupermGetShipmentInfoData `json:"data"`
|
||||
}
|
||||
|
||||
//配送状态: CALLING = 1 // 骑手呼叫中 RECEIVED = 2 //骑手已接单 ARRIVED = 3 //骑手已到取货点 PICKUPPED = 4 //骑手已取货 DELIVERING= 5 //骑手配送中 REJECTED = 6 //收货人已拒收 RETURNING = 7 //返回中 RETURNED = 8 //返回完成 DELIVERED = 9 //订单妥投
|
||||
type ShipmentInfo struct {
|
||||
ShopOrderID int64 `json:"shop_order_id"` //交易单号
|
||||
AfterSaleID int64 `json:"aftersale_id"` //售后单号
|
||||
|
||||
@@ -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":""}`
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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{
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user