From f75f1fcdbcd0038f0dc47edefa3ff6dc0d7dbf3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Tue, 24 Oct 2023 10:24:20 +0800 Subject: [PATCH] 1 --- platformapi/dadaapi/dadaapi_test.go | 2 +- platformapi/tao_vegetable/order_test.go | 5 +- .../instantShopping_cancelDelivery_request.go | 54 ++++++++ ...instantShopping_cancelDelivery_response.go | 14 ++ .../instantShopping_createDelivery_request.go | 58 +++++++++ ...instantShopping_createDelivery_response.go | 18 +++ ...opping_getDeliveryListByOrderId_request.go | 50 ++++++++ ...pping_getDeliveryListByOrderId_response.go | 54 ++++++++ ...ntShopping_notifyDeliveryStatus_request.go | 74 +++++++++++ ...tShopping_notifyDeliveryStatus_response.go | 14 ++ ...antShopping_reportRiderLocation_request.go | 66 ++++++++++ ...ntShopping_reportRiderLocation_response.go | 14 ++ .../tiktok_shop/tiktok_api/api_test.go | 2 +- .../tiktok_api/logistics_express.go | 97 +++++++++++++- .../tiktok_api/order_type_const.go | 22 +++- .../tiktok_shop/tiktok_api/sku_test.go | 23 +--- .../tiktok_shop/tiktok_api/transport.go | 120 ++++++++++++------ .../tiktok_shop/tiktok_api/transport_model.go | 41 +++--- utils/riderInfo.go | 2 +- 19 files changed, 645 insertions(+), 85 deletions(-) create mode 100644 platformapi/tiktok_shop/sdk-golang/api/instantShopping_cancelDelivery/request/instantShopping_cancelDelivery_request.go create mode 100644 platformapi/tiktok_shop/sdk-golang/api/instantShopping_cancelDelivery/response/instantShopping_cancelDelivery_response.go create mode 100644 platformapi/tiktok_shop/sdk-golang/api/instantShopping_createDelivery/request/instantShopping_createDelivery_request.go create mode 100644 platformapi/tiktok_shop/sdk-golang/api/instantShopping_createDelivery/response/instantShopping_createDelivery_response.go create mode 100644 platformapi/tiktok_shop/sdk-golang/api/instantShopping_getDeliveryListByOrderId/request/instantShopping_getDeliveryListByOrderId_request.go create mode 100644 platformapi/tiktok_shop/sdk-golang/api/instantShopping_getDeliveryListByOrderId/response/instantShopping_getDeliveryListByOrderId_response.go create mode 100644 platformapi/tiktok_shop/sdk-golang/api/instantShopping_notifyDeliveryStatus/request/instantShopping_notifyDeliveryStatus_request.go create mode 100644 platformapi/tiktok_shop/sdk-golang/api/instantShopping_notifyDeliveryStatus/response/instantShopping_notifyDeliveryStatus_response.go create mode 100644 platformapi/tiktok_shop/sdk-golang/api/instantShopping_reportRiderLocation/request/instantShopping_reportRiderLocation_request.go create mode 100644 platformapi/tiktok_shop/sdk-golang/api/instantShopping_reportRiderLocation/response/instantShopping_reportRiderLocation_response.go diff --git a/platformapi/dadaapi/dadaapi_test.go b/platformapi/dadaapi/dadaapi_test.go index 29660ee0..e71562f4 100644 --- a/platformapi/dadaapi/dadaapi_test.go +++ b/platformapi/dadaapi/dadaapi_test.go @@ -57,7 +57,7 @@ func init() { } func TestComplaintRider(t *testing.T) { - err := dadaapi.ComplaintRider("1100562620683968937", 69) + err := dadaapi.ComplaintRider("5000952191610480635", 69) fmt.Println(err) } diff --git a/platformapi/tao_vegetable/order_test.go b/platformapi/tao_vegetable/order_test.go index 9b81da46..55ca046b 100644 --- a/platformapi/tao_vegetable/order_test.go +++ b/platformapi/tao_vegetable/order_test.go @@ -63,8 +63,8 @@ func TestQueryAfsOrderDetail(t *testing.T) { func TestDeliveryFinishACCEPTED(t *testing.T) { param := &request591.AlibabaAelophyOrderWorkCallbackRequest{} param.WorkCallbackRequest = &domain591.AlibabaAelophyOrderWorkCallbackWorkCallbackRequest{ - StoreId: utils.String2Pointer("lb229"), - BizOrderId: utils.Int64ToPointer(5000950290614680195), + StoreId: utils.String2Pointer("lb019"), + BizOrderId: utils.Int64ToPointer(5000952367288620290), Status: utils.String2Pointer(OrderStatusNew), StatusRemark: nil, //DelivererName: utils.String2Pointer("张廷"), @@ -73,6 +73,7 @@ func TestDeliveryFinishACCEPTED(t *testing.T) { DelivererCompany: nil, LogisticsNo: nil, } + apiTao.SetToken("50002C01524csKWniqfypk8dbshKRTeFIOIy1a46c0cfgsvodWjsseMsXqpvWvECMj1") //apiTao.SetToken("50002C01524csKWniqfypk8dbshKRTeFIOIy1a46c0cfgsvodWjsseMsXqpvWvECMj1") err := apiTao.DeliveryFinish(param) fmt.Println(err) diff --git a/platformapi/tiktok_shop/sdk-golang/api/instantShopping_cancelDelivery/request/instantShopping_cancelDelivery_request.go b/platformapi/tiktok_shop/sdk-golang/api/instantShopping_cancelDelivery/request/instantShopping_cancelDelivery_request.go new file mode 100644 index 00000000..fa3700ee --- /dev/null +++ b/platformapi/tiktok_shop/sdk-golang/api/instantShopping_cancelDelivery/request/instantShopping_cancelDelivery_request.go @@ -0,0 +1,54 @@ +package instantShopping_cancelDelivery_request + +import ( + "encoding/json" + instantShopping_cancelDelivery_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/instantShopping_cancelDelivery/response" + doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core" +) + +type InstantShoppingCancelDeliveryRequest struct { + doudian_sdk.BaseDoudianOpApiRequest + Param *InstantShoppingCancelDeliveryParam +} + +func (c *InstantShoppingCancelDeliveryRequest) GetUrlPath() string { + return "/instantShopping/cancelDelivery" +} + +func New() *InstantShoppingCancelDeliveryRequest { + request := &InstantShoppingCancelDeliveryRequest{ + Param: &InstantShoppingCancelDeliveryParam{}, + } + request.SetConfig(doudian_sdk.GlobalConfig) + request.SetClient(doudian_sdk.DefaultDoudianOpApiClient) + return request + +} + +func (c *InstantShoppingCancelDeliveryRequest) Execute(accessToken *doudian_sdk.AccessToken) (*instantShopping_cancelDelivery_response.InstantShoppingCancelDeliveryResponse, error) { + responseJson, err := c.GetClient().Request(c, accessToken) + if err != nil { + return nil, err + } + response := &instantShopping_cancelDelivery_response.InstantShoppingCancelDeliveryResponse{} + _ = json.Unmarshal([]byte(responseJson), response) + return response, nil + +} + +func (c *InstantShoppingCancelDeliveryRequest) GetParamObject() interface{} { + return c.Param +} + +func (c *InstantShoppingCancelDeliveryRequest) GetParams() *InstantShoppingCancelDeliveryParam { + return c.Param +} + +type InstantShoppingCancelDeliveryParam struct { + // 抖音电商shop order单id + ShopOrderId string `json:"shop_order_id"` + // 门店id + StoreId int64 `json:"store_id"` + // 取消原因,详见附录F01 + CancelCode int64 `json:"cancel_code"` +} diff --git a/platformapi/tiktok_shop/sdk-golang/api/instantShopping_cancelDelivery/response/instantShopping_cancelDelivery_response.go b/platformapi/tiktok_shop/sdk-golang/api/instantShopping_cancelDelivery/response/instantShopping_cancelDelivery_response.go new file mode 100644 index 00000000..a920f382 --- /dev/null +++ b/platformapi/tiktok_shop/sdk-golang/api/instantShopping_cancelDelivery/response/instantShopping_cancelDelivery_response.go @@ -0,0 +1,14 @@ +package instantShopping_cancelDelivery_response + +import ( + "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core" +) + +type InstantShoppingCancelDeliveryResponse struct { + doudian_sdk.BaseDoudianOpApiResponse + Data *InstantShoppingCancelDeliveryData `json:"data"` +} +type InstantShoppingCancelDeliveryData struct { + // 取消价格,单位分 + CancelFee int64 `json:"cancel_fee"` +} diff --git a/platformapi/tiktok_shop/sdk-golang/api/instantShopping_createDelivery/request/instantShopping_createDelivery_request.go b/platformapi/tiktok_shop/sdk-golang/api/instantShopping_createDelivery/request/instantShopping_createDelivery_request.go new file mode 100644 index 00000000..fcce17ff --- /dev/null +++ b/platformapi/tiktok_shop/sdk-golang/api/instantShopping_createDelivery/request/instantShopping_createDelivery_request.go @@ -0,0 +1,58 @@ +package instantShopping_createDelivery_request + +import ( + "encoding/json" + instantShopping_createDelivery_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/instantShopping_createDelivery/response" + doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core" +) + +type InstantShoppingCreateDeliveryRequest struct { + doudian_sdk.BaseDoudianOpApiRequest + Param *InstantShoppingCreateDeliveryParam +} + +func (c *InstantShoppingCreateDeliveryRequest) GetUrlPath() string { + return "/instantShopping/createDelivery" +} + +func New() *InstantShoppingCreateDeliveryRequest { + request := &InstantShoppingCreateDeliveryRequest{ + Param: &InstantShoppingCreateDeliveryParam{}, + } + request.SetConfig(doudian_sdk.GlobalConfig) + request.SetClient(doudian_sdk.DefaultDoudianOpApiClient) + return request + +} + +func (c *InstantShoppingCreateDeliveryRequest) Execute(accessToken *doudian_sdk.AccessToken) (*instantShopping_createDelivery_response.InstantShoppingCreateDeliveryResponse, error) { + responseJson, err := c.GetClient().Request(c, accessToken) + if err != nil { + return nil, err + } + response := &instantShopping_createDelivery_response.InstantShoppingCreateDeliveryResponse{} + _ = json.Unmarshal([]byte(responseJson), response) + return response, nil + +} + +func (c *InstantShoppingCreateDeliveryRequest) GetParamObject() interface{} { + return c.Param +} + +func (c *InstantShoppingCreateDeliveryRequest) GetParams() *InstantShoppingCreateDeliveryParam { + return c.Param +} + +type InstantShoppingCreateDeliveryParam struct { + // 抖音电商shop order单id + ShopOrderId string `json:"shop_order_id"` + // 门店ID + StoreId int64 `json:"store_id"` + // 是否需要取件码(0=不需要,1=需要) + VerifyCodeType int32 `json:"verify_code_type"` + // 序列码列表,如果包含有多个序列码,请用"_"英文下划线分割(属于数码手机类目的商品订单才需要传序列码。) + SerialNumberList string `json:"serial_number_list"` + // 是否需要收件码;true:需要;false:不需要 + NeedReceiverCode bool `json:"need_receiver_code"` +} diff --git a/platformapi/tiktok_shop/sdk-golang/api/instantShopping_createDelivery/response/instantShopping_createDelivery_response.go b/platformapi/tiktok_shop/sdk-golang/api/instantShopping_createDelivery/response/instantShopping_createDelivery_response.go new file mode 100644 index 00000000..6c78f1c3 --- /dev/null +++ b/platformapi/tiktok_shop/sdk-golang/api/instantShopping_createDelivery/response/instantShopping_createDelivery_response.go @@ -0,0 +1,18 @@ +package instantShopping_createDelivery_response + +import ( + "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core" +) + +type InstantShoppingCreateDeliveryResponse struct { + doudian_sdk.BaseDoudianOpApiResponse + Data *InstantShoppingCreateDeliveryData `json:"data"` +} +type InstantShoppingCreateDeliveryData struct { + // 订单配送距离,单位米 + DeliveryDistance int64 `json:"delivery_distance"` + // 订单配送价格,单位分 + DeliveryFee int64 `json:"delivery_fee"` + // 四到六位验证码 + PickupGoodsCode string `json:"pickup_goods_code"` +} diff --git a/platformapi/tiktok_shop/sdk-golang/api/instantShopping_getDeliveryListByOrderId/request/instantShopping_getDeliveryListByOrderId_request.go b/platformapi/tiktok_shop/sdk-golang/api/instantShopping_getDeliveryListByOrderId/request/instantShopping_getDeliveryListByOrderId_request.go new file mode 100644 index 00000000..f0d16215 --- /dev/null +++ b/platformapi/tiktok_shop/sdk-golang/api/instantShopping_getDeliveryListByOrderId/request/instantShopping_getDeliveryListByOrderId_request.go @@ -0,0 +1,50 @@ +package instantShopping_getDeliveryListByOrderId_request + +import ( + "encoding/json" + "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/instantShopping_getDeliveryListByOrderId/response" + "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core" +) + +type InstantShoppingGetDeliveryListByOrderIdRequest struct { + doudian_sdk.BaseDoudianOpApiRequest + Param *InstantShoppingGetDeliveryListByOrderIdParam +} + +func (c *InstantShoppingGetDeliveryListByOrderIdRequest) GetUrlPath() string { + return "/instantShopping/getDeliveryListByOrderId" +} + +func New() *InstantShoppingGetDeliveryListByOrderIdRequest { + request := &InstantShoppingGetDeliveryListByOrderIdRequest{ + Param: &InstantShoppingGetDeliveryListByOrderIdParam{}, + } + request.SetConfig(doudian_sdk.GlobalConfig) + request.SetClient(doudian_sdk.DefaultDoudianOpApiClient) + return request + +} + +func (c *InstantShoppingGetDeliveryListByOrderIdRequest) Execute(accessToken *doudian_sdk.AccessToken) (*instantShopping_getDeliveryListByOrderId_response.InstantShoppingGetDeliveryListByOrderIdResponse, error) { + responseJson, err := c.GetClient().Request(c, accessToken) + if err != nil { + return nil, err + } + response := &instantShopping_getDeliveryListByOrderId_response.InstantShoppingGetDeliveryListByOrderIdResponse{} + _ = json.Unmarshal([]byte(responseJson), response) + return response, nil + +} + +func (c *InstantShoppingGetDeliveryListByOrderIdRequest) GetParamObject() interface{} { + return c.Param +} + +func (c *InstantShoppingGetDeliveryListByOrderIdRequest) GetParams() *InstantShoppingGetDeliveryListByOrderIdParam { + return c.Param +} + +type InstantShoppingGetDeliveryListByOrderIdParam struct { + // 抖音电商shop order单id + ShopOrderId string `json:"shop_order_id"` +} diff --git a/platformapi/tiktok_shop/sdk-golang/api/instantShopping_getDeliveryListByOrderId/response/instantShopping_getDeliveryListByOrderId_response.go b/platformapi/tiktok_shop/sdk-golang/api/instantShopping_getDeliveryListByOrderId/response/instantShopping_getDeliveryListByOrderId_response.go new file mode 100644 index 00000000..80167d9f --- /dev/null +++ b/platformapi/tiktok_shop/sdk-golang/api/instantShopping_getDeliveryListByOrderId/response/instantShopping_getDeliveryListByOrderId_response.go @@ -0,0 +1,54 @@ +package instantShopping_getDeliveryListByOrderId_response + +import ( + "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core" +) + +type InstantShoppingGetDeliveryListByOrderIdResponse struct { + doudian_sdk.BaseDoudianOpApiResponse + Data *InstantShoppingGetDeliveryListByOrderIdData `json:"data"` +} +type DeliveryStatusHistoryItem struct { + // 骑手纬度 + RiderLat string `json:"rider_lat"` + // 骑手经度 + RiderLng string `json:"rider_lng"` + // 骑手姓名 + RiderName string `json:"rider_name"` + // 状态发送时间,时间戳s + OperateTime int64 `json:"operate_time"` + // 运力状态,枚举:101:待骑手接单102:骑手已接单103:骑手已到店104:骑手已取货200:已送达300:已取消 + Status int64 `json:"status"` +} +type InstantShoppingGetDeliveryListByOrderIdData struct { + // 抖音订单id + ShopOrderId string `json:"shop_order_id"` + // 运力状态,枚举:101:待骑手接单102:骑手已接单103:骑手已到店104:骑手已取货200:已送达300:已取消 + Status int64 `json:"status"` + // 抖音配送的该单预计送达开始时间,为时间戳格式,单位为秒 + PredictDeliveryTimeStart int64 `json:"predict_delivery_time_start"` + // 抖音配送的该单预计送达结束时间,为时间戳格式,单位为秒 + PredictDeliveryTimeEnd int64 `json:"predict_delivery_time_end"` + // 骑手名称 + RiderName string `json:"rider_name"` + // 骑手手机号 + RiderPhone string `json:"rider_phone"` + // 骑手经度,高德坐标系 + RiderLng string `json:"rider_lng"` + // 骑手纬度,高德坐标系 + RiderLat string `json:"rider_lat"` + // 取消code + CancelCode int64 `json:"cancel_code"` + // 取消原因 + CancelReason string `json:"cancel_reason"` + // 订单配送距离,单位为米 + DeliveryDistance int64 `json:"delivery_distance"` + // 订单配送价格,单位为分 + DeliveryFee int64 `json:"delivery_fee"` + // 取件码 + PickupGoodsCode string `json:"pickup_goods_code"` + // 收件码 + DeliveryGoodsCode string `json:"delivery_goods_code"` + // 配送状态历史列表 + DeliveryStatusHistory []DeliveryStatusHistoryItem `json:"delivery_status_history"` +} diff --git a/platformapi/tiktok_shop/sdk-golang/api/instantShopping_notifyDeliveryStatus/request/instantShopping_notifyDeliveryStatus_request.go b/platformapi/tiktok_shop/sdk-golang/api/instantShopping_notifyDeliveryStatus/request/instantShopping_notifyDeliveryStatus_request.go new file mode 100644 index 00000000..a7b7fe63 --- /dev/null +++ b/platformapi/tiktok_shop/sdk-golang/api/instantShopping_notifyDeliveryStatus/request/instantShopping_notifyDeliveryStatus_request.go @@ -0,0 +1,74 @@ +package instantShopping_notifyDeliveryStatus_request + +import ( + "encoding/json" + "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/instantShopping_notifyDeliveryStatus/response" + "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core" +) + +type InstantShoppingNotifyDeliveryStatusRequest struct { + doudian_sdk.BaseDoudianOpApiRequest + Param *InstantShoppingNotifyDeliveryStatusParam +} + +func (c *InstantShoppingNotifyDeliveryStatusRequest) GetUrlPath() string { + return "/instantShopping/notifyDeliveryStatus" +} + +func New() *InstantShoppingNotifyDeliveryStatusRequest { + request := &InstantShoppingNotifyDeliveryStatusRequest{ + Param: &InstantShoppingNotifyDeliveryStatusParam{}, + } + request.SetConfig(doudian_sdk.GlobalConfig) + request.SetClient(doudian_sdk.DefaultDoudianOpApiClient) + return request + +} + +func (c *InstantShoppingNotifyDeliveryStatusRequest) Execute(accessToken *doudian_sdk.AccessToken) (*instantShopping_notifyDeliveryStatus_response.InstantShoppingNotifyDeliveryStatusResponse, error) { + responseJson, err := c.GetClient().Request(c, accessToken) + if err != nil { + return nil, err + } + response := &instantShopping_notifyDeliveryStatus_response.InstantShoppingNotifyDeliveryStatusResponse{} + _ = json.Unmarshal([]byte(responseJson), response) + return response, nil + +} + +func (c *InstantShoppingNotifyDeliveryStatusRequest) GetParamObject() interface{} { + return c.Param +} + +func (c *InstantShoppingNotifyDeliveryStatusRequest) GetParams() *InstantShoppingNotifyDeliveryStatusParam { + return c.Param +} + +type InstantShoppingNotifyDeliveryStatusParam struct { + // 抖音电商shop order单id + ShopOrderId string `json:"shop_order_id"` + // 三方运力服务商 + DistributionCode string `json:"distribution_code"` + // 三方运单号,自配送时传空字符串 + DistributionDeliveryId string `json:"distribution_delivery_id"` + // 骑手姓名;骑手已接单/到店/取货/送达状态时必传; + RiderName *string `json:"rider_name"` + // 骑手电话;骑手已接单/到店/取货/送达状态时必传; + RiderPhone *string `json:"rider_phone"` + // 骑手手机号类型,0是真实号,1是隐私号 + RiderPhoneType int32 `json:"rider_phone_type"` + // 骑手经度;骑手已接单/到店/取货/送达状态时必传;高德坐标系 + RiderLongitude *string `json:"rider_longitude"` + // 骑手维度;骑手已接单/到店/取货/送达状态时必传;高德坐标系 + RiderLatitude *string `json:"rider_latitude"` + // 骑手位置上报时间戳,传入骑手坐标时必填 + ReportTime int64 `json:"report_time"` + // 状态更新时间戳 + UpdateTime int64 `json:"update_time"` + // 取消原因 + CancelReason *string `json:"cancel_reason"` + // 取消编码,参考附件F01,取消状态时必传 + CancelCode *int64 `json:"cancel_code"` + // 运力状态,枚举:101:待骑手接单102:骑手已接单103:骑手已到店104:骑手已取货200:已送达300:已取消 + Status int64 `json:"status"` +} diff --git a/platformapi/tiktok_shop/sdk-golang/api/instantShopping_notifyDeliveryStatus/response/instantShopping_notifyDeliveryStatus_response.go b/platformapi/tiktok_shop/sdk-golang/api/instantShopping_notifyDeliveryStatus/response/instantShopping_notifyDeliveryStatus_response.go new file mode 100644 index 00000000..43e1f80d --- /dev/null +++ b/platformapi/tiktok_shop/sdk-golang/api/instantShopping_notifyDeliveryStatus/response/instantShopping_notifyDeliveryStatus_response.go @@ -0,0 +1,14 @@ +package instantShopping_notifyDeliveryStatus_response + +import ( + "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core" +) + +type InstantShoppingNotifyDeliveryStatusResponse struct { + doudian_sdk.BaseDoudianOpApiResponse + Data *InstantShoppingNotifyDeliveryStatusData `json:"data"` +} +type InstantShoppingNotifyDeliveryStatusData struct { + // 抖音电商shop order单id + ShopOrderId string `json:"shop_order_id"` +} diff --git a/platformapi/tiktok_shop/sdk-golang/api/instantShopping_reportRiderLocation/request/instantShopping_reportRiderLocation_request.go b/platformapi/tiktok_shop/sdk-golang/api/instantShopping_reportRiderLocation/request/instantShopping_reportRiderLocation_request.go new file mode 100644 index 00000000..285a37ae --- /dev/null +++ b/platformapi/tiktok_shop/sdk-golang/api/instantShopping_reportRiderLocation/request/instantShopping_reportRiderLocation_request.go @@ -0,0 +1,66 @@ +package instantShopping_reportRiderLocation_request + +import ( + "encoding/json" + "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/instantShopping_reportRiderLocation/response" + "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core" +) + +type InstantShoppingReportRiderLocationRequest struct { + doudian_sdk.BaseDoudianOpApiRequest + Param *InstantShoppingReportRiderLocationParam +} + +func (c *InstantShoppingReportRiderLocationRequest) GetUrlPath() string { + return "/instantShopping/reportRiderLocation" +} + +func New() *InstantShoppingReportRiderLocationRequest { + request := &InstantShoppingReportRiderLocationRequest{ + Param: &InstantShoppingReportRiderLocationParam{}, + } + request.SetConfig(doudian_sdk.GlobalConfig) + request.SetClient(doudian_sdk.DefaultDoudianOpApiClient) + return request + +} + +func (c *InstantShoppingReportRiderLocationRequest) Execute(accessToken *doudian_sdk.AccessToken) (*instantShopping_reportRiderLocation_response.InstantShoppingReportRiderLocationResponse, error) { + responseJson, err := c.GetClient().Request(c, accessToken) + if err != nil { + return nil, err + } + response := &instantShopping_reportRiderLocation_response.InstantShoppingReportRiderLocationResponse{} + _ = json.Unmarshal([]byte(responseJson), response) + return response, nil + +} + +func (c *InstantShoppingReportRiderLocationRequest) GetParamObject() interface{} { + return c.Param +} + +func (c *InstantShoppingReportRiderLocationRequest) GetParams() *InstantShoppingReportRiderLocationParam { + return c.Param +} + +type InstantShoppingReportRiderLocationParam struct { + // 抖音电商shop order单id + ShopOrderId string `json:"shop_order_id"` + // 三方运力服务商 + DistributionCode string `json:"distribution_code"` + // 三方运单号 + DistributionDeliveryId string `json:"distribution_delivery_id"` + // 骑手姓名; + RiderName string `json:"rider_name"` + // 骑手手机号类型,0是真实号,1是隐私号 + RiderPhoneType int32 `json:"rider_phone_type"` + // 骑手电话; + RiderPhone string `json:"rider_phone"` + // 骑手经度,高德坐标系 + RiderLongitude string `json:"rider_longitude"` + // 骑手维度,高德坐标系 + RiderLatitude string `json:"rider_latitude"` + // 骑手上报时间戳 + ReportTime int64 `json:"report_time"` +} diff --git a/platformapi/tiktok_shop/sdk-golang/api/instantShopping_reportRiderLocation/response/instantShopping_reportRiderLocation_response.go b/platformapi/tiktok_shop/sdk-golang/api/instantShopping_reportRiderLocation/response/instantShopping_reportRiderLocation_response.go new file mode 100644 index 00000000..d64f4563 --- /dev/null +++ b/platformapi/tiktok_shop/sdk-golang/api/instantShopping_reportRiderLocation/response/instantShopping_reportRiderLocation_response.go @@ -0,0 +1,14 @@ +package instantShopping_reportRiderLocation_response + +import ( + "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core" +) + +type InstantShoppingReportRiderLocationResponse struct { + doudian_sdk.BaseDoudianOpApiResponse + Data *InstantShoppingReportRiderLocationData `json:"data"` +} +type InstantShoppingReportRiderLocationData struct { + // 抖音电商shop order单id + ShopOrderId string `json:"shop_order_id"` +} diff --git a/platformapi/tiktok_shop/tiktok_api/api_test.go b/platformapi/tiktok_shop/tiktok_api/api_test.go index 55cf9c82..590958aa 100644 --- a/platformapi/tiktok_shop/tiktok_api/api_test.go +++ b/platformapi/tiktok_shop/tiktok_api/api_test.go @@ -90,7 +90,7 @@ func TestOrderStatusAndPsInfo(t *testing.T) { param["opcode"] = "DELIVERED" param["courier_name"] = "刘磊" param["courier_phone"] = "18981810340" - a.OrderStatusAndPsInfo(param) + a.OrderStatusAndPsInfoNew(param) } // diff --git a/platformapi/tiktok_shop/tiktok_api/logistics_express.go b/platformapi/tiktok_shop/tiktok_api/logistics_express.go index 2ac9db80..bc9c528f 100644 --- a/platformapi/tiktok_shop/tiktok_api/logistics_express.go +++ b/platformapi/tiktok_shop/tiktok_api/logistics_express.go @@ -3,12 +3,14 @@ package tiktok_api import ( "encoding/json" "errors" + instantShopping_notifyDeliveryStatus_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/instantShopping_notifyDeliveryStatus/request" logistics_indTrackPush_reqeust "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/logistics_indTrackPush/request" token_create_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/token_create/request" token_create_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/token_create/response" doudian_sdk "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/core" "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/globals" + "math" "sync" "time" ) @@ -110,9 +112,9 @@ func (a *APIExpress) RefreshToken() (*doudian_sdk.CreateTokenData, error) { return &createToken.Data, nil } -// OrderStatusAndPsInfo 三方配送同步骑手位置信息 +// OrderStatusAndPsInfoOld 三方配送同步骑手位置信息(老版本的运力回传) // 抖音物流信息和抖音小时达完全区分开(这边的appKey和APPSecret完全不同于小时达) -func (a *APIExpress) OrderStatusAndPsInfo(param map[string]interface{}) error { +func (a *APIExpress) OrderStatusAndPsInfoOld(param map[string]interface{}) error { // 组合参数 request := logistics_indTrackPush_reqeust.New() psInfo := &logistics_indTrackPush_reqeust.LogisticsIndTrackPushParam{ @@ -164,3 +166,94 @@ func (a *APIExpress) OrderStatusAndPsInfo(param map[string]interface{}) error { } return nil } + +// OrderStatusAndPsInfoNew 三方配送同步骑手位置信息(新版本的运力回传) +// 抖音物流信息和抖音小时达完全区分开(这边的appKey和APPSecret完全不同于小时达) +func (a *APIExpress) OrderStatusAndPsInfoNew(param map[string]interface{}) error { + // 组合参数 + request := instantShopping_notifyDeliveryStatus_request.New() + request.Param = &instantShopping_notifyDeliveryStatus_request.InstantShoppingNotifyDeliveryStatusParam{ + ShopOrderId: param["order_id"].(string), + RiderPhoneType: 0, + ReportTime: time.Now().Unix(), + UpdateTime: time.Now().Unix(), + } + if param["courier_name"].(string) != "" { + request.Param.RiderName = utils.String2Pointer(param["courier_name"].(string)) + } + if param["courier_phone"].(string) != "" { + request.Param.RiderPhone = utils.String2Pointer(param["courier_phone"].(string)) + } + + switch param["logistics_provider_code"].(string) { + case utils.DaDaCode: + request.Param.DistributionCode = TiktokDeliveryTypeDaDa + case utils.FnPsCode: + request.Param.DistributionCode = TiktokDeliveryTypeFengNiao + case utils.UUPTCode: + request.Param.DistributionCode = TiktokDeliveryTypeUU + case utils.SFPSCode: + request.Param.DistributionCode = TiktokDeliveryTypeSF + case utils.MTPsCode: + request.Param.DistributionCode = TiktokDeliveryTypeMeiTuan + case utils.MyselfPsCode: + request.Param.DistributionCode = TiktokDeliveryTypeMerchant + } + + // 纬度 + if param["latitude"].(string) != "" && param["longitude"].(string) != "" { + if len(param["latitude"].(string)) > len("39.978573") && len(param["longitude"].(string)) > len("116.5031060") { // 是否为百度坐标 + lat, lng := AutoGaoDe2BaiDu(param["latitude"].(string), param["longitude"].(string)) + request.Param.RiderLatitude = utils.String2Pointer(lat) + request.Param.RiderLongitude = utils.String2Pointer(lng) + } else { + request.Param.RiderLatitude = utils.String2Pointer(param["latitude"].(string)) + request.Param.RiderLongitude = utils.String2Pointer(param["longitude"].(string)) + } + } + + if param["logistics_provider_code"].(string) != "MERCHANT" { + request.Param.DistributionDeliveryId = param["third_carrier_order_id"].(string) + } + + switch param["opcode"].(string) { + case TiktokLogisticsStatusCALLRIDER: + request.Param.Status = 101 + case TiktokLogisticsORDERRECEIVED: + request.Param.Status = 102 + case TiktokLogisticsRIDERARRIVED: + request.Param.Status = 103 + case TiktokLogisticsRIDERPICKUP: + request.Param.Status = 104 + case TiktokLogisticsDELIVERED: + request.Param.Status = 200 + case TiktokLogisticsCANCELDELIVERY, TiktokLogisticsINDDELIVERYEXCEPTION: + request.Param.Status = 300 + request.Param.CancelCode = utils.Int64ToPointer(200) // 其他原因 + request.Param.CancelReason = utils.String2Pointer("骑手未能到店,更换骑手") // 其他原因 + } + if a.accessTokenObj == nil || a.accessTokenObj.CreateTokenData.AccessToken == "" { + a.CreateToken() + } else if a.expiresIn < time.Now().Unix() { + a.RefreshToken() + } + + result, err := request.Execute(a.accessTokenObj) + if err != nil { + return err + } + if result.Code != RequestSuccessCode { + return errors.New(result.SubMsg + ":" + result.LogId) + } + return nil +} + +func AutoGaoDe2BaiDu(lat, lon string) (string, string) { + x := utils.Str2Float64(lon) - 0.0065 + y := utils.Str2Float64(lat) - 0.006 + z := math.Sqrt(x*x+y*y) - 0.00002*math.Sin(y*math.Pi) + theta := math.Atan2(y, x) - 0.000003*math.Cos(x*math.Pi) + tempLon := z * math.Cos(theta) + tempLat := z * math.Sin(theta) + return utils.Float64ToStr(tempLat), utils.Float64ToStr(tempLon) +} diff --git a/platformapi/tiktok_shop/tiktok_api/order_type_const.go b/platformapi/tiktok_shop/tiktok_api/order_type_const.go index cd0e8316..c9520031 100644 --- a/platformapi/tiktok_shop/tiktok_api/order_type_const.go +++ b/platformapi/tiktok_shop/tiktok_api/order_type_const.go @@ -198,7 +198,6 @@ const ( ) // 商品审核状态: 1-未提交;2-待审核;3-审核通过;4-审核未通过;5-封禁;7-审核通过待上架;详见商品状态机:https://op.jinritemai.com/docs/question-docs/92/2070 - const ( SkuCheckStatusNotCommit = 1 // 未提交 SkuCheckStatusWaitCheck = 2 // 待审核 @@ -207,3 +206,24 @@ const ( SkuCheckStatusProhibit = 5 // 禁封 SkuCheckStatusPassNotPutOn = 7 // 通过待上架 ) + +const ( + TiktokCancelCode201 = 201 // 超出配送范围 + TiktokCancelCode203 = 203 // 运力紧张无可接单骑手 + TiktokCancelCode204 = 204 // 骑手联系不上收货人 + TiktokCancelCode208 = 208 // 商家未营业 + TiktokCancelCode209 = 209 // 商家无法出餐 + TiktokCancelCode210 = 210 // 商家地址错误 + TiktokCancelCode211 = 211 // 用户拒收 + TiktokCancelCode222 = 222 // 用户取消订单 + TiktokCancelCode200 = 200 // 其他原因 +) + +const ( + TiktokDeliveryTypeSF = "SF" //SF:顺丰同城 + TiktokDeliveryTypeDaDa = "DADA" //DADA:达达 + TiktokDeliveryTypeFengNiao = "FENG_NIAO" //FENG_NIAO:蜂鸟配送 + TiktokDeliveryTypeMeiTuan = "MEI_TUAN" //MEI_TUAN:美团配送 + TiktokDeliveryTypeUU = "UU" //UU:UU跑腿 + TiktokDeliveryTypeMerchant = "MERCHANT" //MERCHANT:商家自配送,使用此枚举需要提前和平台沟通 +) diff --git a/platformapi/tiktok_shop/tiktok_api/sku_test.go b/platformapi/tiktok_shop/tiktok_api/sku_test.go index f55e1b09..c1a55efc 100644 --- a/platformapi/tiktok_shop/tiktok_api/sku_test.go +++ b/platformapi/tiktok_shop/tiktok_api/sku_test.go @@ -134,30 +134,11 @@ func TestBatchDecrypt(t *testing.T) { // a.OrderUserInfoSensitive("4988354190732430566") //} -var c = []int64{64270223} - -//668851, -//668841, -//668711, -//668770, -//668709, -//668708, -//668713, -//668707, -//668712,running -//668710,running -//668714,running - -//668723, ok -//668790, no -//668789, no -//668785, no -//668512, running -//667481, running +var c = []int64{64270123} // 删除已经创建商品,重新同步 func TestDeleteSkuAndUploadSku(t *testing.T) { - var token = `{"access_token":"7b2a921d-176e-42e9-ae43-2ff47bc84ad3","expires_in":1697682826,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"633e1be6-6dfb-4c51-9e71-72502a35330e","authority_id":""}` + var token = `{"access_token":"b27e1e5a-0e07-4311-b98b-69df26bbd82e","expires_in":1698285505,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市速食","refresh_token":"f6822620-4154-4a4a-b04e-7db30c08e7f9","authority_id":""}` var a = New("7267745202649957900", "51998fcf-d521-4553-8c0c-fa662c8dbd6e", token) var errList = make([]error, 0, 0) diff --git a/platformapi/tiktok_shop/tiktok_api/transport.go b/platformapi/tiktok_shop/tiktok_api/transport.go index 2193cef0..854d5fcb 100644 --- a/platformapi/tiktok_shop/tiktok_api/transport.go +++ b/platformapi/tiktok_shop/tiktok_api/transport.go @@ -2,19 +2,21 @@ package tiktok_api import ( "errors" + "fmt" + instantShopping_cancelDelivery_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/instantShopping_cancelDelivery/request" + instantShopping_createDelivery_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/instantShopping_createDelivery/request" + instantShopping_getDeliveryListByOrderId_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/instantShopping_getDeliveryListByOrderId/request" + instantShopping_getDeliveryListByOrderId_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/instantShopping_getDeliveryListByOrderId/response" superm_applyPlatformPickUp_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_applyPlatformPickUp/request" superm_cancelPlatformPickUp_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_cancelPlatformPickUp/request" superm_createVirtualMobile_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_createVirtualMobile/request" superm_createVirtualMobile_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_createVirtualMobile/response" superm_getDispatcherInfo_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_getDispatcherInfo/request" superm_getPlatformPickUpEstimatedCharge_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_getPlatformPickUpEstimatedCharge/request" - superm_getShipmentInfo_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_getShipmentInfo/request" - superm_getShipmentInfo_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_getShipmentInfo/response" superm_getStoreAutoCallRiderInfo_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_getStoreAutoCallRiderInfo/request" superm_getStoreAutoCallRiderInfo_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_getStoreAutoCallRiderInfo/response" - superm_orderDispatcher_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_orderDispatcher/request" superm_setStoreAutoCallRider_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_setStoreAutoCallRider/request" - "strings" + "git.rosy.net.cn/baseapi/utils" ) // /superm/getDispatcherInfo 运力呼叫询价/运力取消询价(正向) @@ -35,22 +37,47 @@ func (a *API) GetDispatcherInfo(storeID int64, shopOrderID string, dispatcherFee return response.Data.DispatcherFee, nil } -// /superm/shopOrderDispatcher 呼叫运力并发货/重新发货、取消运力 +// ShopOrderDispatcher 取消运力,运力接口改版,取消和重新呼叫分开 func (a *API) ShopOrderDispatcher(storeID int64, shopOrderID string, dispatcherType int32) error { - request := superm_orderDispatcher_request.New() - request.Param = &superm_orderDispatcher_request.SupermOrderDispatcherParam{ - StoreID: storeID, - ShopOrderID: shopOrderID, - DispatcherType: dispatcherType, + if dispatcherType == DispatcherFeeTypeCancel { // 取消运力 + request := instantShopping_cancelDelivery_request.New() + request.Param = &instantShopping_cancelDelivery_request.InstantShoppingCancelDeliveryParam{ + ShopOrderId: shopOrderID, + StoreId: storeID, + CancelCode: 0, + } + response, err := request.Execute(a.accessTokenObj) + if err != nil { + return err + } + if response.Code != RequestSuccessCode && response.Code != 90000 { + return errors.New(response.SubMsg + ":" + response.LogId) + } + return nil + } else if dispatcherType == DispatcherFeeTypeCall { // 呼叫运力 + request := instantShopping_createDelivery_request.New() + request.Param = &instantShopping_createDelivery_request.InstantShoppingCreateDeliveryParam{ + ShopOrderId: shopOrderID, + StoreId: storeID, + } + response, err := request.Execute(a.accessTokenObj) + if err != nil { + return err + } + if response.Code != RequestSuccessCode { + return errors.New(response.SubMsg + ":" + response.LogId) + } + return nil } - response, err := request.Execute(a.accessTokenObj) - if err != nil { - return err - } - if response.Code != RequestSuccessCode && response.Code != 90000 { - return errors.New(response.SubMsg + ":" + response.LogId) - } - return nil + + // 老版本 + //request := superm_orderDispatcher_request.New() + //request.Param = &superm_orderDispatcher_request.SupermOrderDispatcherParam{ + // StoreID: storeID, + // ShopOrderID: shopOrderID, + // DispatcherType: dispatcherType, + //} + return fmt.Errorf("抖音运力呼叫/取消type异常") } // /superm/setStoreAutoCallRider 订单自动呼叫运力 设置操作 @@ -132,35 +159,48 @@ func (a *API) ApplyPlatformPickUp(afterSaleID int64) (string, error) { return response.Data.LogisticsID, err } -// /superm/getShipmentInfo 查询运力订单信息 -func (a *API) GetShipmentInfo(shopOrderID, afterSaleID, shipmentType int64) (*superm_getShipmentInfo_response.ShipmentInfo, error) { - request := superm_getShipmentInfo_request.New() - request.Param = &superm_getShipmentInfo_request.SupermGetShipmentInfoParam{ - ShopOrderID: shopOrderID, - ShipmentType: shipmentType, +// GetShipmentInfo 查询运力订单信息 +func (a *API) GetShipmentInfo(shopOrderID, afterSaleID, shipmentType int64) (*instantShopping_getDeliveryListByOrderId_response.InstantShoppingGetDeliveryListByOrderIdData, error) { + request := instantShopping_getDeliveryListByOrderId_request.New() + request.Param = &instantShopping_getDeliveryListByOrderId_request.InstantShoppingGetDeliveryListByOrderIdParam{ + ShopOrderId: utils.Int64ToStr(shopOrderID), } response, err := request.Execute(a.accessTokenObj) if err != nil { return nil, err } - - if strings.Contains(response.SubMsg, "订单不存在") || strings.Contains(response.SubMsg, "未找到当前物流订单, LO") { - return &superm_getShipmentInfo_response.ShipmentInfo{ - ShopOrderID: shopOrderID, - AfterSaleID: 0, - TrackNo: "", - ShopID: 0, - ShipmentStatus: -1, - ShipmentError: 0, - RiderName: "", - RiderPhone: "", - RiderLongitude: "", - RiderLatitude: "", - OccurredTime: "", - }, nil + if response.Code != RequestSuccessCode { + return nil, errors.New(response.SubMsg + ":" + response.LogId) } - return response.Data.ShipmentInfo, err + return response.Data, nil + //request := superm_getShipmentInfo_request.New() + //request.Param = &superm_getShipmentInfo_request.SupermGetShipmentInfoParam{ + // ShopOrderID: shopOrderID, + // ShipmentType: shipmentType, + //} + //response, err := request.Execute(a.accessTokenObj) + //if err != nil { + // return nil, err + //} + // + //if strings.Contains(response.SubMsg, "订单不存在") || strings.Contains(response.SubMsg, "未找到当前物流订单, LO") { + // return &superm_getShipmentInfo_response.ShipmentInfo{ + // ShopOrderID: shopOrderID, + // AfterSaleID: 0, + // TrackNo: "", + // ShopID: 0, + // ShipmentStatus: -1, + // ShipmentError: 0, + // RiderName: "", + // RiderPhone: "", + // RiderLongitude: "", + // RiderLatitude: "", + // OccurredTime: "", + // }, nil + //} + // + //return response.Data.ShipmentInfo, err } // /superm/cancelPlatformPickUp 取消运力 (逆向) diff --git a/platformapi/tiktok_shop/tiktok_api/transport_model.go b/platformapi/tiktok_shop/tiktok_api/transport_model.go index eeea3cef..bca0c6ef 100644 --- a/platformapi/tiktok_shop/tiktok_api/transport_model.go +++ b/platformapi/tiktok_shop/tiktok_api/transport_model.go @@ -23,15 +23,15 @@ const ( ) const ( - ShipmentStatusCalling = 1 - ShipmentStatusReceived = 2 - ShipmentStatusArrived = 3 - ShipmentStatusDelivering = 4 + ShipmentStatusCalling = 101 + ShipmentStatusReceived = 102 + ShipmentStatusArrived = 103 + ShipmentStatusDelivering = 104 ShipmentStatusRejected = 5 ShipmentStatusReturning = 6 ShipmentStatusReturned = 7 - ShipmentStatusDelivered = 8 - ShipmentStatusCanceled = 9 + ShipmentStatusDelivered = 200 + ShipmentStatusCanceled = 300 ) var ShipmentStatus = map[int64]string{ @@ -84,14 +84,23 @@ var ShipmentError = map[int]string{ //小时达运力状态变更消息体 type ShipmentInfoData struct { - AfterSaleID int64 `json:"aftersale_id"` //上门取运力对应售后单号 - TrackNo string `json:"track_no"` //骑手配送运单号 - RiderName string `json:"rider_name"` //骑手名称 - RiderPhone string `json:"rider_phone"` //骑手电话 - RiderLatitude string `json:"rider_latitude"` //骑手坐标纬度 - RiderLongitude string `json:"rider_longitude"` //骑手坐标经度 - ShopOrderID int64 `json:"shop_order_id"` //店铺订单号 - ShopID int64 `json:"shop_id"` //抖店门店ID - ShipmentStatus int64 `json:"shipment_status"` //运单状态 - OccurredTime string `json:"occurred_time"` //当前状态变更时间 + RiderPhone string `json:"rider_phone"` //骑手电话 + RiderLng string `json:"rider_lng"` //骑手经度 + RiderLat string `json:"rider_lat"` //骑手纬度 + OperateTime string `json:"operate_time"` //状态变更时间 + ShopID int64 `json:"shop_id"` //抖店门店ID + RiderName string `json:"rider_name"` //骑手名称 + CancelCode int64 `json:"cancel_code"` //取消原因 + ShopOrderID int64 `json:"shop_order_id"` //店铺订单号 + Status int64 `json:"status"` //运力状态 + //AfterSaleID int64 `json:"aftersale_id"` //上门取运力对应售后单号 + //TrackNo string `json:"track_no"` //骑手配送运单号 + //RiderName string `json:"rider_name"` //骑手名称 + //RiderPhone string `json:"rider_phone"` //骑手电话 + //RiderLatitude string `json:"rider_latitude"` //骑手坐标纬度 + //RiderLongitude string `json:"rider_longitude"` //骑手坐标经度 + //ShopOrderID int64 `json:"shop_order_id"` //店铺订单号 + //ShopID int64 `json:"shop_id"` //抖店门店ID + //ShipmentStatus int64 `json:"shipment_status"` //运单状态 + //OccurredTime string `json:"occurred_time"` //当前状态变更时间 } diff --git a/utils/riderInfo.go b/utils/riderInfo.go index ca6267c4..224575d3 100644 --- a/utils/riderInfo.go +++ b/utils/riderInfo.go @@ -16,7 +16,7 @@ type RiderInfo struct { ThirdCarrierOrderId string `json:"third_carrier_order_id"` // 京西平台id(运单id) CourierName string `json:"courier_name"` // 骑手名称 CourierPhone string `json:"courier_phone"` // 骑手电话 - LogisticsProviderCode string `json:"logistics_provider_code"` // 配送平台code 10001-顺丰, 10002-达达, 10003-闪送, 10004-蜂鸟, 10005 UU跑腿,10006 快跑者, 10007 极客快送,10008-点我达,10009 同达, 10010-生活半径,10011 邻趣,10012 趣送, 10013 快服务 10014 菜鸟新配盟 10015 商家自建配送 10016 风先生,10017-其他,10018-抖音配送(小时达),10032-美团跑腿 + LogisticsProviderCode string `json:"logistics_provider_code"` // 配送平台code LogisticsStatus int `json:"logistics_status"` // 配送状态(美团用) LogisticsContext string `json:"logistics_context"` // 配送状态描述 Latitude string `json:"latitude"` // 骑手当前的纬度,美团使用的是高德坐标系。