|
|
@ -51,7 +51,7 @@
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//区域所属商户名下距离最近的回收站
|
|
|
|
<!-- 区域所属商户名下距离最近的回收站-->
|
|
|
|
<select id="getNearbyInArea" resultType="RecycleStation">
|
|
|
|
<select id="getNearbyInArea" resultType="RecycleStation">
|
|
|
|
SELECT a.*,
|
|
|
|
SELECT a.*,
|
|
|
|
ROUND(
|
|
|
|
ROUND(
|
|
|
@ -59,7 +59,7 @@
|
|
|
|
SQRT(
|
|
|
|
SQRT(
|
|
|
|
POW(SIN((#{position.latitude} - latitude) * PI() / 360), 2) +
|
|
|
|
POW(SIN((#{position.latitude} - latitude) * PI() / 360), 2) +
|
|
|
|
COS(#{position.latitude} * PI() / 180) * COS(latitude * PI() / 180) *
|
|
|
|
COS(#{position.latitude} * PI() / 180) * COS(latitude * PI() / 180) *
|
|
|
|
POW(SIN((#{postion.longitude} - longitude) * PI() / 360), 2))) * 1000
|
|
|
|
POW(SIN((#{position.longitude} - longitude) * PI() / 360), 2))) * 1000
|
|
|
|
) AS distance
|
|
|
|
) AS distance
|
|
|
|
FROM nx_enterprise_recycle_station a
|
|
|
|
FROM nx_enterprise_recycle_station a
|
|
|
|
WHERE a.latitude IS NOT NULL
|
|
|
|
WHERE a.latitude IS NOT NULL
|
|
|
|