1
This commit is contained in:
@@ -302,7 +302,7 @@ func (c *DeliveryHandler) GetRiderInfo(orderId string, deliveryId int64, mtPeiso
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &mtpsapi.RiderInfo{
|
||||
result := &mtpsapi.RiderInfo{
|
||||
OrderId: utils.Int64ToStr(order.TrackingId),
|
||||
ThirdCarrierOrderId: orderId,
|
||||
CourierName: knightInfo.CarrierDriverName,
|
||||
@@ -311,5 +311,24 @@ func (c *DeliveryHandler) GetRiderInfo(orderId string, deliveryId int64, mtPeiso
|
||||
LogisticsStatus: order.OrderStatus, // 默认正在配送中
|
||||
Latitude: knightInfo.CarrierDriverLatitude,
|
||||
Longitude: knightInfo.CarrierDriverLongitude,
|
||||
}, nil
|
||||
}
|
||||
|
||||
switch order.OrderStatus {
|
||||
case 20: // 骑手接单
|
||||
result.LogisticsStatus = model.WaybillStatusCourierAssigned
|
||||
case 80: // 骑手到店
|
||||
result.LogisticsStatus = model.WaybillStatusCourierArrived
|
||||
case 2: // 配送中
|
||||
result.LogisticsStatus = model.WaybillStatusDelivering
|
||||
case 3: // 完成
|
||||
result.LogisticsStatus = model.WaybillStatusDelivered
|
||||
case 4: // 取消
|
||||
result.LogisticsStatus = model.WaybillStatusAcceptCanceled
|
||||
case 5: // 配送异常
|
||||
result.LogisticsStatus = model.WaybillStatusDeliverFailed
|
||||
default:
|
||||
result.LogisticsStatus = 0
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user