Commit 13de83e7 authored by 周健威's avatar 周健威

修改车辆距离

parent bd89ebf3
...@@ -1050,7 +1050,7 @@ ...@@ -1050,7 +1050,7 @@
as hasVehicle as hasVehicle
</if> </if>
<if test="lon != null and lat != null"> <if test="lon != null and lat != null">
,st_distance_sphere(point(#{lon}, #{lat}), point(bc.longitude, bc.latitude)) as distance ,st_distance_sphere(point(#{lon}, #{lat}), point(bcm.longitude, bcm.latitude)) as distance
</if> </if>
<include refid="searchUsableSql"/> <include refid="searchUsableSql"/>
...@@ -1121,7 +1121,7 @@ ...@@ -1121,7 +1121,7 @@
, bcm.province_name as manageProvinceName , bcm.province_name as manageProvinceName
, bcm.city_name as manageCityName , bcm.city_name as manageCityName
<if test="lon != null and lat != null"> <if test="lon != null and lat != null">
,st_distance_sphere(point(#{lon}, #{lat}), point(bc.longitude, bc.latitude)) as distance ,st_distance_sphere(point(#{lon}, #{lat}), point(bcm.longitude, bcm.latitude)) as distance
</if> </if>
<if test=" catas2 != null "> <if test=" catas2 != null ">
,vc.catas as catas ,vc.catas as catas
...@@ -1474,7 +1474,7 @@ ...@@ -1474,7 +1474,7 @@
bc1.province_name as manageProvinceName, bc1.province_name as manageProvinceName,
bc1.city_name as manageCityName bc1.city_name as manageCityName
<if test="lon != null and lat != null"> <if test="lon != null and lat != null">
,st_distance_sphere(point(#{lon}, #{lat}), point(bc.longitude, bc.latitude)) as distance ,st_distance_sphere(point(#{lon}, #{lat}), point(bc1.longitude, bc1.latitude)) as distance
</if> </if>
FROM vehicle v FROM vehicle v
LEFT JOIN vehicle_brand b ON v.brand_id=b.id LEFT JOIN vehicle_brand b ON v.brand_id=b.id
......
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