package com.hai.dao; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import java.util.List; import java.util.Map; /** * mapper扩展类 */ public interface HighGasOilPriceMapperExt { @Select("" ) List> selectStoreListByOilNo(@Param("storeName") String storeName, @Param("regionId") Long regionId, @Param("oilNoName") String oilNoName); @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 recentGasStation(@Param("longitude") String longitude,@Param("latitude") String latitude); }