燕山石化溯源三维电子沙盘-【后端】-服务
1
13693261870
2023-07-14 33b0919883649a0be826e0ac897f6bbbaf8d3f63
1
已修改2个文件
6 ■■■■ 文件已修改
src/main/java/com/yssh/service/LocationService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/LocationMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/yssh/service/LocationService.java
@@ -52,7 +52,7 @@
        List<Location> list = new ArrayList<>();
        // 1米=0.0000089932
        for (Location loc : vocAddrs) {
            if (Math.abs(loc.getLon() - x) <= 0.00009 && Math.abs(loc.getLat() - y) <= 0.00009) {
            if (Math.abs(loc.getLon() - x) <= 0.0009 && Math.abs(loc.getLat() - y) <= 0.0009) {
                list.add(loc);
            }
        }
src/main/resources/mapper/LocationMapper.xml
@@ -16,9 +16,9 @@
    <select id="selectByXY" resultMap="locationResult">
        <include refid="locationSql"></include>
        <where>
            lon between (#{x} - 0.00009) and (#{x} + 0.00009)
            lon between (#{x} - 0.0009) and (#{x} + 0.0009)
            and
            lat between (#{y} - 0.00009) and (#{y} + 0.00009)
            lat between (#{y} - 0.0009) and (#{y} + 0.0009)
        </where>
    </select>