diff --git a/business/jxstore/cms/cms.go b/business/jxstore/cms/cms.go index a738f86fe..ae18c4a0e 100644 --- a/business/jxstore/cms/cms.go +++ b/business/jxstore/cms/cms.go @@ -5,6 +5,7 @@ import ( "fmt" "git.rosy.net.cn/baseapi/platformapi/autonavi" "git.rosy.net.cn/baseapi/platformapi/baidunavi" + "git.rosy.net.cn/jx-callback/globals" "math" "reflect" "regexp" @@ -648,11 +649,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) + globals.SugarLogger.Debugf("=======riderInfo := %s", utils.Format4Output(riderInfo, false)) if riderInfo != nil { - if len(riderInfo.Longitude) < len("104.065861") && riderInfo.Longitude != "" { + if len(riderInfo.Longitude) < len("104.065861") || riderInfo.Longitude != "" { riderInfo.Longitude += "0" } - if len(riderInfo.Latitude) < len("27.934441") && riderInfo.Latitude != "" { + if len(riderInfo.Latitude) < len("27.934441") || riderInfo.Latitude != "" { riderInfo.Latitude += "0" } v.CourierCoordinate = fmt.Sprintf("%s,%s", riderInfo.Longitude, riderInfo.Latitude) @@ -666,11 +668,12 @@ func GetSToURidingDistance2(sLng, sLat, uLng, uLat float64, orderId string) (way // 如果是平台配送,获取骑手信息 if handler := partner.GetPurchaseOrderHandlerFromVendorID(v.WaybillVendorID); handler != nil { riderInfo, _ := handler.OrderLogisticsStatus(v.VendorOrderID) + globals.SugarLogger.Debugf("=======riderInfo := %s", utils.Format4Output(riderInfo, false)) if riderInfo != nil { - if len(riderInfo.Longitude) < len("104.065861") && riderInfo.Longitude != "" { + if len(riderInfo.Longitude) < len("104.065861") || riderInfo.Longitude != "" { riderInfo.Longitude += "0" } - if len(riderInfo.Latitude) < len("27.934441") && riderInfo.Latitude != "" { + if len(riderInfo.Latitude) < len("27.934441") || riderInfo.Latitude != "" { riderInfo.Latitude += "0" } v.CourierCoordinate = fmt.Sprintf("%s,%s", riderInfo.Longitude, riderInfo.Latitude) @@ -702,6 +705,7 @@ func GetSToURidingDistance2(sLng, sLat, uLng, uLat float64, orderId string) (way } } + globals.SugarLogger.Debugf("=========v := %s", utils.Format4Output(v, false)) dao.UpdateEntity(db, v, "OriginalData", "CourierCoordinate", "Distance", "DurationTime") if v.CourierName == "" || v.CourierMobile == "" { v.CourierName = "暂无骑手"