1
This commit is contained in:
@@ -439,7 +439,7 @@ func (c *DeliveryHandler) GetRiderInfo(orderId string, deliveryId int64, mtPeiso
|
||||
ThirdCarrierOrderId: mtPeisongId,
|
||||
CourierName: order.TransporterName,
|
||||
CourierPhone: order.TransporterPhone,
|
||||
LogisticsProviderCode: string(mtpsapi.DaDaCode),
|
||||
LogisticsProviderCode: mtpsapi.DaDaCode,
|
||||
LogisticsStatus: order.StatusCode,
|
||||
Latitude: order.TransporterLat,
|
||||
Longitude: order.TransporterLng,
|
||||
|
||||
@@ -307,7 +307,7 @@ func (c *DeliveryHandler) GetRiderInfo(orderId string, deliveryId int64, mtPeiso
|
||||
ThirdCarrierOrderId: utils.Int64ToStr(order.TrackingId),
|
||||
CourierName: knightInfo.CarrierDriverName,
|
||||
CourierPhone: knightInfo.CarrierDriverPhone,
|
||||
LogisticsProviderCode: string(mtpsapi.FnPsCode),
|
||||
LogisticsProviderCode: mtpsapi.FnPsCode,
|
||||
LogisticsStatus: order.OrderStatus, // 默认正在配送中
|
||||
Latitude: knightInfo.CarrierDriverLatitude,
|
||||
Longitude: knightInfo.CarrierDriverLongitude,
|
||||
|
||||
@@ -401,23 +401,23 @@ func (c *DeliveryHandler) GetRiderInfo(orderId string, deliveryId int64, mtPeiso
|
||||
ThirdCarrierOrderId: utils.Interface2String(order["mt_peisong_id"]),
|
||||
CourierName: utils.Interface2String(order["courier_name"]),
|
||||
CourierPhone: utils.Interface2String(order["courier_phone"]),
|
||||
LogisticsProviderCode: string(mtpsapi.MTPsCode),
|
||||
LogisticsProviderCode: mtpsapi.MTPsCode,
|
||||
LogisticsStatus: int(utils.MustInterface2Int64(order["status"])), // 默认正在配送中
|
||||
Latitude: utils.Float64ToStr(jxutils.IntCoordinate2Standard(lat)),
|
||||
Longitude: utils.Float64ToStr(jxutils.IntCoordinate2Standard(lng)),
|
||||
}
|
||||
switch int(utils.MustInterface2Int64(order["status"])) {
|
||||
case 20 : //已接单
|
||||
switch int(utils.MustInterface2Int64(order["status"])) {
|
||||
case 20: //已接单
|
||||
result.LogisticsStatus = model.WaybillStatusCourierAssigned
|
||||
case 30 : //已取货
|
||||
case 30: //已取货
|
||||
result.LogisticsStatus = model.WaybillStatusDelivering
|
||||
case 50 : //已送达
|
||||
case 50: //已送达
|
||||
result.LogisticsStatus = model.WaybillStatusDelivered
|
||||
case 90 : //已取消
|
||||
case 90: //已取消
|
||||
result.LogisticsStatus = model.WaybillStatusCanceled
|
||||
default:
|
||||
result.LogisticsStatus = model.WaybillStatusDeliverFailed
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,16 +78,16 @@ func GetOrderRiderInfoToPlatform(orderId string) {
|
||||
globals.SugarLogger.Debug("同步外卖骑手位置信息到美团失败,为获取到订单的骑手信息:", "----")
|
||||
continue
|
||||
}
|
||||
if v.WaybillVendorID == model.VendorIDDada {
|
||||
riderInfo.LogisticsProviderCode = string(mtpsapi.DaDaCode)
|
||||
riderInfo.OrderId = v.VendorOrderID // 运单id
|
||||
}
|
||||
if v.WaybillVendorID == model.VendorIDFengNiao {
|
||||
riderInfo.LogisticsProviderCode = string(mtpsapi.FnPsCode)
|
||||
}
|
||||
if v.WaybillVendorID == model.VendorIDMTPS {
|
||||
riderInfo.LogisticsProviderCode = string(mtpsapi.MTPsCode)
|
||||
}
|
||||
//if v.WaybillVendorID == model.VendorIDDada {
|
||||
// riderInfo.LogisticsProviderCode = "10002"
|
||||
// riderInfo.OrderId = v.VendorOrderID // 运单id
|
||||
//}
|
||||
//if v.WaybillVendorID == model.VendorIDFengNiao {
|
||||
// riderInfo.LogisticsProviderCode = "10004"
|
||||
//}
|
||||
//if v.WaybillVendorID == model.VendorIDMTPS {
|
||||
// riderInfo.LogisticsProviderCode = "10032"
|
||||
//}
|
||||
riderInfo.ThirdCarrierOrderId = v.VendorWaybillID
|
||||
switch riderInfo.LogisticsStatus {
|
||||
case 20: //配送中
|
||||
|
||||
Reference in New Issue
Block a user