根据经纬度查询门店测试
This commit is contained in:
@@ -2388,6 +2388,7 @@ func GetStoreListByLocation(ctx *jxcontext.Context, lng, lat float64, needWalkDi
|
||||
var storeList1 []*Store4User
|
||||
fmt.Println(sql)
|
||||
fmt.Println(sqlParams)
|
||||
fmt.Println(lng1, lng2, lat1, lat2)
|
||||
if err = dao.GetRows(dao.GetDB(), &storeList1, sql, sqlParams...); err == nil {
|
||||
var storeList2 []*Store4User
|
||||
for _, v := range storeList1 {
|
||||
@@ -2411,9 +2412,6 @@ func GetStoreListByLocation(ctx *jxcontext.Context, lng, lat float64, needWalkDi
|
||||
model.YES,
|
||||
}
|
||||
dao.GetRows(dao.GetDB(), &storeList2, sql, sqlParams2...)
|
||||
fmt.Println(sql)
|
||||
fmt.Println(sqlParams2)
|
||||
fmt.Println(storeList2)
|
||||
if len(storeList2) > 1 {
|
||||
storeList2 = storeList2[:1]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user