From 779f26a63bf0eefcc41709448ab7bce7b4a4e645 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Fri, 9 Aug 2024 17:18:04 +0800 Subject: [PATCH] 1 --- business/jxstore/cms/cms.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/business/jxstore/cms/cms.go b/business/jxstore/cms/cms.go index 08222f58b..af72e45b4 100644 --- a/business/jxstore/cms/cms.go +++ b/business/jxstore/cms/cms.go @@ -622,14 +622,10 @@ func GetSToURidingDistance2(sLng, sLat, uLng, uLat float64, orderId string) (way if err != nil { return nil, err } - if len(waybills) == 0 { - return wayBill, err + if len(waybills) == model.NO { + return nil, fmt.Errorf("请先创建运单,或者转自配送") } for _, v := range waybills { - if len(waybills) == 1 && v.Status == model.OrderStatusCanceled { - return nil, nil - } - // 获取骑行路线图 if v.OriginalData == "" { originalData, distance, durationTime, err := GetCyclingLine(sLng, sLat, uLng, uLat)