mysql表place中的location字段为point类型
# mybatis传参lon(经度),lat(纬度),radius(半径,单位:m)
select * from place where ST_Distance_Sphere(place.location,ST_PointFromText('POINT(${lon} ${lat})',4326)) <![CDATA[<=]]> #{radius}
mysql表place中的location字段为point类型
# mybatis传参lon(经度),lat(纬度),radius(半径,单位:m)
select * from place where ST_Distance_Sphere(place.location,ST_PointFromText('POINT(${lon} ${lat})',4326)) <![CDATA[<=]]> #{radius}
本文标题:mybatis查询mysql指定半径内的数据
本文链接:https://www.haomeiwen.com/subject/kokhlktx.html
网友评论