From 0385f7b1c140283c1e4c9e05b575a129dc6b45a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Tue, 3 Mar 2020 14:12:35 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E7=AE=97=E7=82=B9=E7=9A=84=E5=B7=A6?= =?UTF-8?q?=E8=BE=B9=EF=BC=8C=E8=8B=A5=E4=B8=A4=E8=BE=B9=E5=9D=90=E6=A0=87?= =?UTF-8?q?=E9=87=8D=E5=90=88=E4=B9=9F=E7=AE=97=E8=90=BD=E5=9C=A8=E9=87=8C?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index 20d593071..7b15f1dcc 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -2382,7 +2382,8 @@ func GetStoreListByLocation(ctx *jxcontext.Context, lng, lat float64, needWalkDi if err = dao.GetRows(dao.GetDB(), &storeList1, sql, sqlParams...); err == nil { var storeList2 []*Store4User for _, v := range storeList1 { - if distance := jxutils.Point2StoreDistance(lng, lat, v.Lng, v.Lat, v.DeliveryRangeType, v.DeliveryRange); distance > 0 { + distance := jxutils.Point2StoreDistance(lng, lat, v.Lng, v.Lat, v.DeliveryRangeType, v.DeliveryRange) + if distance > 0 || (lng == jxutils.IntCoordinate2Standard(v.Lng) && lat == jxutils.IntCoordinate2Standard(v.Lat)) { v.Distance = distance storeList2 = append(storeList2, v) }