From 851d1d14c646f69d40751f75caeff55d41c85b14 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期五, 15 九月 2023 15:26:16 +0800 Subject: [PATCH] 1 --- src/main/resources/mapper/LocationMapper.xml | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/main/resources/mapper/LocationMapper.xml b/src/main/resources/mapper/LocationMapper.xml index d826e52..8e04b51 100644 --- a/src/main/resources/mapper/LocationMapper.xml +++ b/src/main/resources/mapper/LocationMapper.xml @@ -13,8 +13,8 @@ SELECT id, name, type, format(lon, 6) lon, format(lat, 6) lat FROM location </sql> - <select id="selectByXY" resultMap="locationResult"> - <include refid="locationSql"></include> + <select id="selectByXY" resultType="com.yssh.entity.Location"> + select id, name, type, lon, lat from location <where> lon between (#{x} - 0.0009) and (#{x} + 0.0009) and @@ -22,13 +22,13 @@ </where> </select> - <select id="selectVocAddrs" resultMap="locationResult"> + <select id="selectVocAddrs" resultType="com.yssh.entity.Location"> select id, x "lon", y "lat", addr "name" from voc_addr where length(addr) > 0; </select> - <select id="query" resultMap="locationResult"> + <select id="query" resultType="com.yssh.entity.Location"> <include refid="locationSql"></include> <where> <if test="name != null and name != ''"> @@ -39,9 +39,10 @@ </if> </where> </select> - - <select id="getAll" resultMap="locationResult"> - <include refid="locationSql"></include> + + <!--include refid="locationSql"></include--> + <select id="getAll" resultType="com.yssh.entity.Location"> + select id, name, type, lon, lat from location; </select> <insert id="insertLocation" parameterType="com.yssh.entity.Location"> -- Gitblit v1.9.3