This commit is contained in:
邹宗楠
2022-10-31 15:00:10 +08:00
parent d6cef286c2
commit efd68f9150
12 changed files with 36 additions and 28 deletions

View File

@@ -449,6 +449,7 @@ func (c *DeliveryHandler) GetRiderInfo(orderId string, deliveryId int64, mtPeiso
CourierPhone: order.TransporterPhone,
LogisticsProviderCode: mtpsapi.DaDaCode,
LogisticsStatus: order.StatusCode,
LogisticsContext: "",
Latitude: order.TransporterLat,
Longitude: order.TransporterLng,
}
@@ -458,16 +459,22 @@ func (c *DeliveryHandler) GetRiderInfo(orderId string, deliveryId int64, mtPeiso
// result.LogisticsStatus = model.WaybillStatusCourierAssigned
case 100: // 骑手到店
result.LogisticsStatus = model.WaybillStatusCourierArrived
result.LogisticsContext = model.RiderGetOrder
case 3: // 配送中
result.LogisticsStatus = model.WaybillStatusDelivering
result.LogisticsContext = model.RiderGetOrderDelivering
case 4: // 完成
result.LogisticsStatus = model.WaybillStatusDelivered
result.LogisticsContext = model.RiderGetOrderDelivered
case 5: // 取消
result.LogisticsStatus = model.WaybillStatusCanceled
result.LogisticsContext = model.RiderGetOrderCanceled
case 9: // 配送异常
result.LogisticsStatus = model.WaybillStatusDeliverFailed
result.LogisticsContext = model.RiderGetOrderDeliverFailed
default:
result.LogisticsStatus = 0
result.LogisticsContext = model.RiderGetOrderDeliverOther
}
return result, nil

View File

@@ -319,18 +319,25 @@ func (c *DeliveryHandler) GetRiderInfo(orderId string, deliveryId int64, mtPeiso
switch order.OrderStatus {
case 20: // 骑手接单
result.LogisticsStatus = model.WaybillStatusCourierAssigned
result.LogisticsContext = model.RiderGetOrder
case 80: // 骑手到店
result.LogisticsStatus = model.WaybillStatusCourierArrived
result.LogisticsContext = model.RiderToStore
case 2: // 配送中
result.LogisticsStatus = model.WaybillStatusDelivering
result.LogisticsContext = model.RiderGetOrderDelivering
case 3: // 完成
result.LogisticsStatus = model.WaybillStatusDelivered
result.LogisticsContext = model.RiderGetOrderDelivered
case 4: // 取消
result.LogisticsStatus = model.WaybillStatusCanceled
result.LogisticsContext = model.RiderGetOrderCanceled
case 5: // 配送异常
result.LogisticsStatus = model.WaybillStatusDeliverFailed
result.LogisticsContext = model.RiderGetOrderDeliverFailed
default:
result.LogisticsStatus = 0
result.LogisticsContext = model.RiderGetOrderDeliverOther
}
return result, nil

View File

@@ -411,14 +411,19 @@ func (c *DeliveryHandler) GetRiderInfo(orderId string, deliveryId int64, mtPeiso
switch int(utils.MustInterface2Int64(order["status"])) {
case 20: //已接单
result.LogisticsStatus = model.WaybillStatusCourierAssigned
result.LogisticsContext = model.RiderGetOrder
case 30: //已取货
result.LogisticsStatus = model.WaybillStatusDelivering
result.LogisticsContext = model.RiderGetOrderDelivering
case 50: //已送达
result.LogisticsStatus = model.WaybillStatusDelivered
result.LogisticsContext = model.RiderGetOrderDelivered
case 90: //已取消
result.LogisticsStatus = model.WaybillStatusCanceled
result.LogisticsContext = model.RiderGetOrderCanceled
default:
result.LogisticsStatus = model.WaybillStatusDeliverFailed
result.LogisticsContext = model.RiderGetOrderDeliverOther
}
return result, nil