1
This commit is contained in:
@@ -396,8 +396,7 @@ func (c *DeliveryHandler) GetRiderInfo(orderId string, deliveryId int64, mtPeiso
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &mtpsapi.RiderInfo{
|
||||
result := &mtpsapi.RiderInfo{
|
||||
OrderId: orderId,
|
||||
ThirdCarrierOrderId: utils.Interface2String(order["mt_peisong_id"]),
|
||||
CourierName: utils.Interface2String(order["courier_name"]),
|
||||
@@ -406,5 +405,19 @@ func (c *DeliveryHandler) GetRiderInfo(orderId string, deliveryId int64, mtPeiso
|
||||
LogisticsStatus: int(utils.MustInterface2Int64(order["status"])), // 默认正在配送中
|
||||
Latitude: utils.Float64ToStr(jxutils.IntCoordinate2Standard(lat)),
|
||||
Longitude: utils.Float64ToStr(jxutils.IntCoordinate2Standard(lng)),
|
||||
}, nil
|
||||
}
|
||||
}
|
||||
switch int(utils.MustInterface2Int64(order["status"])) {
|
||||
case 20 : //已接单
|
||||
result.LogisticsStatus = model.WaybillStatusCourierAssigned
|
||||
case 30 : //已取货
|
||||
result.LogisticsStatus = model.WaybillStatusDelivering
|
||||
case 50 : //已送达
|
||||
result.LogisticsStatus = model.WaybillStatusDelivered
|
||||
case 90 : //已取消
|
||||
result.LogisticsStatus = model.WaybillStatusCanceled
|
||||
default:
|
||||
result.LogisticsStatus = model.WaybillStatusDeliverFailed
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
Reference in New Issue
Block a user