Commit a69e057a authored by hezhen's avatar hezhen

123

parent 0c4d03a9
...@@ -24,10 +24,10 @@ ...@@ -24,10 +24,10 @@
<select id="search" parameterType="com.github.wxiaoqi.security.admin.dto.CompanySearchDTO" resultType="com.github.wxiaoqi.security.admin.vo.CompanySearchVO"> <select id="search" parameterType="com.github.wxiaoqi.security.admin.dto.CompanySearchDTO" resultType="com.github.wxiaoqi.security.admin.vo.CompanySearchVO">
select c.*,i.name as companyName,l.name as levelName select c.*,i.name as companyName,l.name as levelName
<if test="lon != null and lat != null"> <if test="lon != null and lat != null">
, ROUND(( (2 * ASIN( SQRT( POW( SIN((latitude * PI() / 180.0 , ROUND(( (2 * ASIN( SQRT( POW( SIN((c.latitude * PI() / 180.0
-${lat} * PI() / 180.0)/2), 2) -${lat} * PI() / 180.0)/2), 2)
+COS( latitude * PI() / 180.0)*COS(${lat} * PI() / 180.0) +COS( c.latitude * PI() / 180.0)*COS(${lat} * PI() / 180.0)
*POW(SIN((longitude * PI() / 180.0 - ${lon} * PI() / *POW(SIN((c.longitude * PI() / 180.0 - ${lon} * PI() /
180.0)/2),2))))*6378.137)*10000)/10000 as distance 180.0)/2),2))))*6378.137)*10000)/10000 as distance
</if> </if>
from branch_company c from branch_company c
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment