1
This commit is contained in:
@@ -438,7 +438,7 @@ func (c *DeliveryHandler) GetRiderInfo(orderId string, deliveryId int64, mtPeiso
|
||||
return nil, errors.New("订单未分配骑手,或订单已经完成了")
|
||||
}
|
||||
|
||||
return &mtpsapi.RiderInfo{
|
||||
result := &mtpsapi.RiderInfo{
|
||||
OrderId: "",
|
||||
ThirdCarrierOrderId: orderId,
|
||||
CourierName: order.TransporterName,
|
||||
@@ -447,5 +447,24 @@ func (c *DeliveryHandler) GetRiderInfo(orderId string, deliveryId int64, mtPeiso
|
||||
LogisticsStatus: order.StatusCode,
|
||||
Latitude: order.TransporterLat,
|
||||
Longitude: order.TransporterLng,
|
||||
}, nil
|
||||
}
|
||||
|
||||
switch order.StatusCode {
|
||||
//case 20: // 骑手接单
|
||||
// result.LogisticsStatus = model.WaybillStatusCourierAssigned
|
||||
case 100: // 骑手到店
|
||||
result.LogisticsStatus = model.WaybillStatusCourierArrived
|
||||
case 3: // 配送中
|
||||
result.LogisticsStatus = model.WaybillStatusDelivering
|
||||
case 4: // 完成
|
||||
result.LogisticsStatus = model.WaybillStatusDelivered
|
||||
case 5: // 取消
|
||||
result.LogisticsStatus = model.WaybillStatusAcceptCanceled
|
||||
case 9: // 配送异常
|
||||
result.LogisticsStatus = model.WaybillStatusDeliverFailed
|
||||
default:
|
||||
result.LogisticsStatus = 0
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user