<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="org.springblade.modules.trajectory.mapper.TrajectoryMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="trajectoryResultMap" type="org.springblade.modules.trajectory.entity.Trajectory">
|
<id column="id" property="id"/>
|
<result column="snumber" property="snumber"/>
|
<result column="sname" property="sname"/>
|
<result column="jd" property="jd"/>
|
<result column="wd" property="wd"/>
|
<result column="stime" property="stime"/>
|
<result column="coordinate" property="coordinate"/>
|
</resultMap>
|
|
|
<select id="selectTrajectoryPage" resultMap="trajectoryResultMap">
|
select * from sys_trajectory where is_deleted = 0
|
</select>
|
|
|
<insert id="s">
|
INSERT INTO sys_trajectory (snumber,sname,jd,wd,stime,coordinate) VALUES (#{snumber},#{sname},#{jd},#{wd},#{stime},POINT(#{jd},#{wd}))
|
</insert>
|
|
|
|
<!--获取安保人员实时的所有位置信息-->
|
<select id="selectList" resultMap="trajectoryResultMap">
|
SELECT
|
id,snumber,sname,jd,wd,stime,ST_ASTEXT(coordinate) as coordinate
|
FROM
|
sys_trajectory
|
WHERE snumber=#{snumber}
|
</select>
|
|
</mapper>
|