提交代码

dev-discount
胡锐 3 years ago
parent 0e3de283d6
commit e84498eba2
  1. 5
      hai-service/src/main/java/com/hai/dao/HighGasOilPriceMapperExt.java

@ -33,7 +33,8 @@ public interface HighGasOilPriceMapperExt {
List<Map<String,Object>> selectStoreListByOilNo(@Param("storeName") String storeName, @Param("regionId") Long regionId, @Param("oilNoName") String oilNoName);
@Select({"SELECT store_key storeKey,ROUND((st_distance_sphere(point(longitude, latitude) , point(${longitude},${latitude}))/1000),2) as distance\n" +
"FROM high_merchant_store where type = 1 and `status` = 1 ORDER BY distance asc LIMIT 1"})
@Select({" SELECT a.store_key storeKey,ROUND((st_distance_sphere(point(a.longitude, a.latitude) , point(${longitude},${latitude}))/1000),2) as distance" +
" FROM high_merchant_store a,high_gas_oil_price b where a.type = 1 and a.`status` = 1 and a.id = b.merchant_store_id GROUP BY a.id" +
" ORDER BY distance asc LIMIT 1" })
Map<String,Object> recentGasStation(@Param("longitude") String longitude,@Param("latitude") String latitude);
}

Loading…
Cancel
Save