1
This commit is contained in:
@@ -2,7 +2,6 @@ package cms
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"math"
|
||||
"reflect"
|
||||
"regexp"
|
||||
@@ -631,10 +630,8 @@ func GetSToURidingDistance2(sLng, sLat, uLng, uLat float64, orderId string) (way
|
||||
if v.Status == model.WaybillStatusCanceled {
|
||||
continue
|
||||
}
|
||||
//if v.Status >= model.WaybillStatusAccepted && v.Status <= model.WaybillStatusCanceled {
|
||||
// 获取骑行路线图
|
||||
if v.OriginalData == "" {
|
||||
//originalData, distance, durationTime, err := GetCyclingLine(origin, destination)
|
||||
originalData, distance, durationTime, err := GetCyclingLine(sLng, sLat, uLng, uLat)
|
||||
if err == nil {
|
||||
v.OriginalData = strings.Join(originalData, ";")
|
||||
@@ -643,7 +640,6 @@ func GetSToURidingDistance2(sLng, sLat, uLng, uLat float64, orderId string) (way
|
||||
}
|
||||
|
||||
}
|
||||
//}
|
||||
|
||||
if vendorMaps[v.WaybillVendorID] == model.YES {
|
||||
// 如果是三方配送,更新骑手信息
|
||||
@@ -734,7 +730,6 @@ func GetCyclingLine(sLng, sLat, uLng, uLat float64) (polyLineList []string, dist
|
||||
if err != nil {
|
||||
return nil, 0, 0, err
|
||||
}
|
||||
globals.SugarLogger.Debugf("==============:data %s", utils.Format4Output(data, false))
|
||||
if data == "" {
|
||||
return nil, 0, 0, fmt.Errorf("获取骑行规划路线错误")
|
||||
}
|
||||
@@ -742,7 +737,6 @@ func GetCyclingLine(sLng, sLat, uLng, uLat float64) (polyLineList []string, dist
|
||||
if err := utils.Map2StructByJson(data, path, false); err != nil {
|
||||
return nil, 0, 0, err
|
||||
}
|
||||
globals.SugarLogger.Debugf("==============:path %s", utils.Format4Output(path, false))
|
||||
|
||||
distance = int64(path.Routes[0].Distance) // 距离
|
||||
duration = int64(path.Routes[0].Duration) // 时间
|
||||
|
||||
@@ -413,7 +413,6 @@ func UpdateFakeWayBillToTiktok() {
|
||||
if fakeWayBill[i].StatusTime.After(time.Now()) {
|
||||
continue
|
||||
}
|
||||
globals.SugarLogger.Debugf("=============waybill := %s", utils.Format4Output(i, false))
|
||||
|
||||
riderInfo := &utils.RiderInfo{
|
||||
OrderId: fakeWayBill[i].VendorOrderID,
|
||||
@@ -443,7 +442,6 @@ func UpdateFakeWayBillToTiktok() {
|
||||
handler := partner.GetPurchaseOrderHandlerFromVendorID(fakeWayBill[i].OrderVendorID)
|
||||
if handler != nil {
|
||||
order, _ := partner.CurOrderManager.LoadOrder(fakeWayBill[i].VendorOrderID, fakeWayBill[i].OrderVendorID)
|
||||
globals.SugarLogger.Debugf("=============order := %s", utils.Format4Output(order, false))
|
||||
if err := handler.GetOrderRider(fakeWayBill[i].VendorOrgCode, order.VendorStoreID, paramsMap); err != nil {
|
||||
partner.CurOrderManager.OnOrderMsg(order, tao_vegetable.OrderStatusDelivery, fmt.Sprintf("Fake Pull Rider Info Err :%s--%s--%v", riderInfo.OrderId, riderInfo.ThirdCarrierOrderId, err))
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user