This commit is contained in:
邹宗楠
2023-09-08 14:31:10 +08:00
parent c7b69e53d5
commit 86e1b600d3
2 changed files with 18 additions and 3 deletions

View File

@@ -645,6 +645,12 @@ func GetSToURidingDistance2(sLng, sLat, uLng, uLat float64, orderId string) (way
if handler := partner.GetDeliveryPlatformFromVendorID(v.WaybillVendorID); handler != nil {
riderInfo, _ := handler.Handler.GetRiderInfo(v.VendorOrderID, v.ID+1000000, v.VendorWaybillID)
if riderInfo != nil {
if len(riderInfo.Longitude) < len("104.065861") && riderInfo.Longitude != "" {
riderInfo.Longitude += "0"
}
if len(riderInfo.Latitude) < len("27.934441") && riderInfo.Latitude != "" {
riderInfo.Latitude += "0"
}
v.CourierCoordinate = fmt.Sprintf("%s,%s", riderInfo.Longitude, riderInfo.Latitude)
if (v.CourierName == "" || v.CourierMobile == "") && riderInfo.CourierName != "" {
v.CourierName = riderInfo.CourierName
@@ -656,6 +662,12 @@ func GetSToURidingDistance2(sLng, sLat, uLng, uLat float64, orderId string) (way
if handler := partner.GetPurchaseOrderHandlerFromVendorID(v.WaybillVendorID); handler != nil {
riderInfo, _ := handler.OrderLogisticsStatus(v.VendorOrderID)
if riderInfo != nil {
if len(riderInfo.Longitude) < len("104.065861") && riderInfo.Longitude != "" {
riderInfo.Longitude += "0"
}
if len(riderInfo.Latitude) < len("27.934441") && riderInfo.Latitude != "" {
riderInfo.Latitude += "0"
}
v.CourierCoordinate = fmt.Sprintf("%s,%s", riderInfo.Longitude, riderInfo.Latitude)
if (v.CourierName == "" || v.CourierMobile == "") && riderInfo.CourierName != "" {
v.CourierName = riderInfo.CourierName
@@ -689,7 +701,6 @@ func GetSToURidingDistance2(sLng, sLat, uLng, uLat float64, orderId string) (way
v.CourierName = "暂无骑手"
v.CourierMobile = "暂无电话"
}
return v, nil
}