|
@@ -8,6 +8,7 @@
|
|
|
<result property="deviceNo" column="device_no"/>
|
|
|
<result property="longitude" column="longitude_"/>
|
|
|
<result property="latitude" column="latitude_"/>
|
|
|
+ <result property="stationId" column="station_id"/>
|
|
|
<result property="createBy" column="create_by"/>
|
|
|
<result property="createTime" column="create_time"/>
|
|
|
<result property="updateBy" column="update_by"/>
|
|
@@ -22,13 +23,14 @@
|
|
|
-->
|
|
|
<![CDATA[
|
|
|
insert into bus_gps_data_info
|
|
|
- (id_,device_no,longitude_,latitude_,create_by,create_time,update_by,update_time,del_flag)
|
|
|
+ (id_,device_no,longitude_,latitude_,station_id,create_by,create_time,update_by,update_time,del_flag)
|
|
|
values
|
|
|
(
|
|
|
#{id,jdbcType=VARCHAR}
|
|
|
,#{deviceNo,jdbcType=VARCHAR}
|
|
|
,#{longitude,jdbcType=VARCHAR}
|
|
|
,#{latitude,jdbcType=VARCHAR}
|
|
|
+ ,#{stationId,jdbcType=VARCHAR}
|
|
|
,#{createBy,jdbcType=VARCHAR}
|
|
|
,#{createTime,jdbcType= TIMESTAMP }
|
|
|
,#{updateBy,jdbcType=VARCHAR}
|
|
@@ -52,6 +54,9 @@
|
|
|
<if test="latitude!=null">
|
|
|
latitude_=#{latitude,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="stationId != null">
|
|
|
+ station_id = #{stationId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
<if test="createBy!=null">
|
|
|
create_by=#{createBy,jdbcType=VARCHAR},
|
|
|
</if>
|
|
@@ -71,8 +76,7 @@
|
|
|
where id_=#{id}
|
|
|
</update>
|
|
|
<select id="get" parameterType="string" resultMap="GpsDataInfoMap">
|
|
|
- select id_,device_no,longitude_,latitude_,create_by,create_time,update_by,update_time,del_flag
|
|
|
- from bus_gps_data_info where id_=#{0}
|
|
|
+ select * from bus_gps_data_info where id_=#{0}
|
|
|
</select>
|
|
|
<select id="exist" parameterType="string" resultType="int">
|
|
|
select count(*) from bus_gps_data_info where id_=#{0}
|
|
@@ -109,4 +113,16 @@
|
|
|
where device_no=#{deviceNo}
|
|
|
order by create_time desc limit 1
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="findByDeviceNoAndCreateTime" resultMap="GpsDataInfoMap">
|
|
|
+ <![CDATA[
|
|
|
+ select * from bus_gps_data_info
|
|
|
+ where del_flag = 0
|
|
|
+ and device_no = #{gpsDeviceNo}
|
|
|
+ and create_time <= #{maxTime}
|
|
|
+ and create_time >= #{minTime}
|
|
|
+ limit 1
|
|
|
+ ]]>
|
|
|
+
|
|
|
+ </select>
|
|
|
</mapper>
|