燕山石化溯源三维电子沙盘-【后端】-服务
1
13693261870
2023-07-05 2b8df9f5452218cad1f012a008acea724de81fff
src/main/resources/mapping/LocationMapper.xml
@@ -12,6 +12,15 @@
    <sql id="locationSql">
       SELECT id, name, type, format(lon, 6) lon, format(lat, 6) lat FROM location
    </sql>
    <select id="selectByXY" resultMap="locationResult">
        <include refid="locationSql"></include>
        <where>
            lon between (#{x} - 0.000027) and (#{x} + 0.000027)
            and
            lat between (#{y} - 0.000027) and (#{y} + 0.000027)
        </where>
    </select>
    
    <select id="query" resultMap="locationResult">
       <include refid="locationSql"></include>