36 lines
1.2 KiB
XML
36 lines
1.2 KiB
XML
<?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="com.zhangy.skyeye.jm.mapper.JmJobTrailMapper">
|
|
<sql id="selectSql">
|
|
select
|
|
jt.job_id,
|
|
jt.uav_id,
|
|
jt.longitude as lon,
|
|
jt.latitude as lat,
|
|
jt.altitude as height,
|
|
jt.date as create_time
|
|
from jm_status_log jt
|
|
</sql>
|
|
|
|
<select id="selectByJob" resultType="com.zhangy.skyeye.jm.entity.JmJobTrail">
|
|
<include refid="selectSql"/>
|
|
where jt.job_id in
|
|
<foreach item="item" collection="array" open="(" separator="," close=")">
|
|
#{item}
|
|
</foreach>
|
|
order by jt.date
|
|
</select>
|
|
|
|
<select id="selectByUav" resultType="com.zhangy.skyeye.jm.entity.JmJobTrail">
|
|
<include refid="selectSql"/>
|
|
where jt.job_id = #{jobId}
|
|
<if test="array != null and array.length > 0">
|
|
and jt.uav_id in
|
|
<foreach item="item" collection="array" open="(" separator="," close=")">
|
|
#{item}
|
|
</foreach>
|
|
</if>
|
|
order by jt.date
|
|
</select>
|
|
</mapper> |