This commit is contained in:
richboo111
2023-04-25 10:32:22 +08:00
36 changed files with 1077 additions and 180 deletions

View File

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