|
@@ -126,7 +126,7 @@ public interface StoreInfoMapper extends BaseMapper<StoreInfo> {
|
|
|
|
|
|
|
|
@Select(
|
|
@Select(
|
|
|
"select " +
|
|
"select " +
|
|
|
- " ROUND(ST_Distance_Sphere(ST_GeomFromText(CONCAT('POINT(', REPLACE(#{position}, ',', ' '), ')' )), ST_GeomFromText(CONCAT('POINT(', REPLACE(store_position, ',', ' '), ')' ))) / 1000, 2) dist " +
|
|
|
|
|
|
|
+ " ROUND(ST_Distance_Sphere(ST_GeomFromText(CONCAT('POINT(', REPLACE(#{position}, ',', ' '), ')' )), ST_GeomFromText(CONCAT('POINT(', REPLACE(store_position, ',', ' '), ')' ))) / 1000, 1) dist " +
|
|
|
"from store_info where id = #{storeId}"
|
|
"from store_info where id = #{storeId}"
|
|
|
)
|
|
)
|
|
|
Double getStoreDistance(@Param("position") String position,@Param("storeId") Integer storeId);
|
|
Double getStoreDistance(@Param("position") String position,@Param("storeId") Integer storeId);
|