sql语句记录下
select * from
(select * , ROUND(6378.137*2*ASIN(SQRT(POWER(SIN((39.865246*PI()/180-lat*PI()/180)/2),2)+
COS(39.865246*PI()/180)*COS(lat*PI()/180)*POWER(SIN((116.378517*PI()/180-lng*PI()/180)/2),2)))*1000,2)
AS distance from sys_unit_location ) as a where a.distance<=25000 order by distance