From 4e4b1079508c6668a82929aa7bf9791af6af5430 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 19 Apr 2023 15:05:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A5=BF=E7=99=BE=E8=87=AA?= =?UTF-8?q?=E9=85=8D=E9=80=81=E9=AA=91=E6=89=8B=E4=BF=A1=E6=81=AF=E6=8E=A8?= =?UTF-8?q?=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platformapi/ebaiapi/order.go | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/platformapi/ebaiapi/order.go b/platformapi/ebaiapi/order.go index 7fbd27cc..d32a3213 100644 --- a/platformapi/ebaiapi/order.go +++ b/platformapi/ebaiapi/order.go @@ -362,6 +362,35 @@ func (a *API) OrderselfDeliveryStateSync(orderID, phone string) (err error) { return err } +type PushRiderInfo struct { + DistributorId int `json:"distributor_id"` // 固定值:201 + Knight Knight `json:"knight"` + OrderId string // 订单id + State int // 配送状态,传固定值:21 开始配送(已废弃,已接入商家不影响) + SelfStatus int `json:"selfStatus"` // 配送状态 + SelfStatusDesc string `json:"selfStatusDesc"` // 配送状态文案描述 + SelfSubStatus int `json:"selfSubStatus"` // 配送取消(6)子原因: + SelfSubStatusDesc string `json:"selfSubStatusDesc"` // 配送异常子状态文案描述 + DistributorInfoDTO DistributorInfoDTO `json:"distributorInfoDTO"` // 配送服务商信息 +} +type Knight struct { + Id int64 `json:"id"` // 骑手id,商家自定义 + Name string `json:"name"` // 骑手姓名 + Phone string `json:"phone"` // 骑手手机号码 +} + +type DistributorInfoDTO struct { + DistributorTypeId string `json:"distributorTypeId"` // 配送商类型id: + DistributorName string `json:"distributorName"` // 配送商名称 + DistributorPhone string `json:"distributorPhone"` // 配送商电话 +} + +// OrderselfDeliveryStateSync2 饿了么自配送订单接入骑手状态 +func (a *API) OrderselfDeliveryStateSync2(info *PushRiderInfo) (err error) { + _, err = a.AccessAPI("order.selfDeliveryStateSync", utils.Struct2MapByJson(info)) + return err +} + // 饿了么自配送订单回传订单已送出状态 // 此接口目前只支持饿了么侧订单调用 func (a *API) OrderSendOut(orderID, phone string) (err error) {