This commit is contained in:
邹宗楠
2022-05-19 11:02:24 +08:00
parent a0a80339d2
commit 513a3db786
2 changed files with 9 additions and 3 deletions

View File

@@ -391,6 +391,12 @@ func (c *DeliveryHandler) GetRiderInfo(orderId string, deliveryId int64, mtPeiso
return nil, err
}
// 获取骑手位置
lng, lat, err := api.MtpsAPI.RiderLocation(deliveryId, utils.Interface2String(order["mt_peisong_id"]))
if err != nil {
return nil, err
}
return &mtpsapi.RiderInfo{
OrderId: utils.Interface2String(order["mt_peisong_id"]),
ThirdCarrierOrderId: utils.Interface2String(order["order_id"]),
@@ -398,7 +404,7 @@ func (c *DeliveryHandler) GetRiderInfo(orderId string, deliveryId int64, mtPeiso
CourierPhone: utils.Interface2String(order["courier_phone"]),
LogisticsProviderCode: string(mtpsapi.MTPsCode),
LogisticsStatus: int(utils.MustInterface2Int64(order["status"])), // 默认正在配送中
Latitude: utils.Interface2String(order["order_id"]),
Longitude: utils.Interface2String(order["order_id"]),
Latitude: utils.Float64ToStr(jxutils.IntCoordinate2Standard(lat)),
Longitude: utils.Float64ToStr(jxutils.IntCoordinate2Standard(lng)),
}, nil
}

View File

@@ -98,7 +98,7 @@ func GetOrderRiderInfoToPlatform(orderId string) {
case model.VendorIDMTWM: // 美团发单
globals.SugarLogger.Debug("struct 2 map ", riderInfo.Latitude, "---", riderInfo.Longitude, "---", riderInfo.CourierName)
paramsMap := utils.Struct2Map(riderInfo, "", true)
globals.SugarLogger.Debug("GetOrderRiderInfoToPlatform map ", paramsMap)
globals.SugarLogger.Debug("GetOrderRiderInfoToPlatform map ", paramsMap)
if handler := partner.GetPurchaseOrderHandlerFromVendorID(v.VendorID); handler != nil {
if err := handler.GetOrderRider(v.VendorOrgCode, v.VendorStoreID, paramsMap); err != nil {
globals.SugarLogger.Errorf("Error pushing meituan rider information :%v", err)