经纬度查门店返回null测试

This commit is contained in:
苏尹岚
2020-03-30 08:49:09 +08:00
parent ebdc369384
commit 08a132acec

View File

@@ -2386,6 +2386,8 @@ func GetStoreListByLocation(ctx *jxcontext.Context, lng, lat float64, needWalkDi
}
var storeList1 []*Store4User
fmt.Println(sql)
fmt.Println(sqlParams)
if err = dao.GetRows(dao.GetDB(), &storeList1, sql, sqlParams...); err == nil {
var storeList2 []*Store4User
for _, v := range storeList1 {
@@ -2408,6 +2410,7 @@ func GetStoreListByLocation(ctx *jxcontext.Context, lng, lat float64, needWalkDi
jxutils.StandardCoordinate2Int(10000),
}
dao.GetRows(dao.GetDB(), &storeList2, sql, sqlParams2...)
fmt.Println(utils.Format4Output(storeList2, false))
if len(storeList2) > 1 {
storeList2 = storeList2[:1]
}