|
@@ -14,7 +14,7 @@
|
|
|
point(mt.longitude, mt.latitude), point(#{param.longitude}, #{param.latitude})
|
|
|
)) distance
|
|
|
from `merchant` mt
|
|
|
- where mt.region = #{param.region} and mt.status = 'ONLINE'
|
|
|
+ where mt.region between #{param.code} and #{param.boundary} and mt.status = 'ONLINE'
|
|
|
order by distance asc limit #{size}
|
|
|
</select>
|
|
|
|
|
@@ -25,7 +25,7 @@
|
|
|
point(mt.longitude, mt.latitude), point(#{param.longitude}, #{param.latitude})
|
|
|
)) distance
|
|
|
from `merchant` mt
|
|
|
- where mt.region = #{param.region} and mt.status = 'ONLINE'
|
|
|
+ where mt.region between #{param.code} and #{param.boundary} and mt.status = 'ONLINE'
|
|
|
order by distance asc
|
|
|
</select>
|
|
|
|
|
@@ -35,7 +35,7 @@
|
|
|
point(mt.longitude, mt.latitude), point(#{param.longitude}, #{param.latitude})
|
|
|
)) distance
|
|
|
from `merchant` mt
|
|
|
- where mt.region = #{param.region} and mt.status = 'ONLINE' and mt.recommend = 1
|
|
|
+ where mt.region between #{param.code} and #{param.boundary} and mt.status = 'ONLINE' and mt.recommend = 1
|
|
|
order by distance asc limit #{size}
|
|
|
</select>
|
|
|
|
|
@@ -46,7 +46,7 @@
|
|
|
point(mt.longitude, mt.latitude), point(#{param.longitude}, #{param.latitude})
|
|
|
)) distance
|
|
|
from `merchant` mt
|
|
|
- where mt.region = #{param.region} and mt.status = 'ONLINE' and mt.recommend = 1
|
|
|
+ where mt.region between #{param.code} and #{param.boundary} and mt.status = 'ONLINE' and mt.recommend = 1
|
|
|
order by distance asc
|
|
|
</select>
|
|
|
|
|
@@ -92,7 +92,7 @@
|
|
|
point(mt.longitude, mt.latitude), point(#{param.longitude}, #{param.latitude})
|
|
|
)) distance
|
|
|
from `merchant` mt
|
|
|
- where mt.id = #{id} and mt.region = #{param.region}
|
|
|
+ where mt.id = #{id} and mt.region between #{param.code} and #{param.boundary}
|
|
|
</select>
|
|
|
|
|
|
<select id="merchantFavorite" resultType="java.lang.Integer">
|