根据经纬度查询门店测试

This commit is contained in:
苏尹岚
2020-03-30 09:36:17 +08:00
parent 3c119c57d6
commit 58c32b1c9a

View File

@@ -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]
}