<?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.ard.work.mapper.UavWaylineMapper">
|
|
<resultMap type="UavWayline" id="UavWaylineResult">
|
<result property="id" column="id" />
|
<result property="name" column="name" />
|
<result property="type" column="type" />
|
<result property="uavModel" column="uav_model" />
|
<result property="payloadModel" column="payload_model" />
|
<result property="globalSpeed" column="global_speed" />
|
<result property="globalHeight" column="global_height" />
|
<result property="userWaypointCount" column="user_waypoint_count" />
|
<result property="planWaypointCount" column="plan_waypoint_count" />
|
<result property="srcWaylineData" column="src_wayline_data" />
|
<result property="planWaylineData" column="plan_wayline_data" />
|
<result property="kmzUrl" column="kmz_url" />
|
<result property="userId" column="user_id" />
|
<result property="deptId" column="dept_id" />
|
<result property="createBy" column="create_by" />
|
<result property="createTime" column="create_time" />
|
<result property="updateBy" column="update_by" />
|
<result property="updateTime" column="update_time" />
|
<result property="remark" column="remark" />
|
</resultMap>
|
|
<sql id="selectUavWaylineVo">
|
select id,
|
name,
|
type,
|
uav_model,
|
payload_model,
|
global_speed,
|
global_height,
|
user_waypoint_count,
|
plan_waypoint_count,
|
src_wayline_data,
|
plan_wayline_data,
|
kmz_url,
|
user_id,
|
dept_id,
|
create_by,
|
create_time,
|
update_by,
|
update_time,
|
remark
|
from uav_wayline
|
</sql>
|
|
<select id="selectUavWaylineList" parameterType="UavWayline" resultMap="UavWaylineResult">
|
<include refid="selectUavWaylineVo"/>
|
<where>
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
<if test="type != null and type != ''"> and type = #{type}</if>
|
<if test="uavModel != null and uavModel != ''"> and uav_model = #{uavModel}</if>
|
<if test="payloadModel != null and payloadModel != ''"> and payload_model = #{payloadModel}</if>
|
<if test="globalSpeed != null "> and global_speed = #{globalSpeed}</if>
|
<if test="globalHeight != null "> and global_height = #{globalHeight}</if>
|
<if test="userWaypointCount != null "> and user_waypoint_count = #{userWaypointCount}</if>
|
<if test="planWaypointCount != null "> and plan_waypoint_count = #{planWaypointCount}</if>
|
<if test="srcWaylineData != null"> and src_wayline_data =#{srcWaylineData}</if>
|
<if test="planWaylineData != null"> and plan_wayline_data = #{planWaylineData}</if>
|
<if test="kmzUrl != null and kmzUrl != ''"> and kmz_url = #{kmzUrl}</if>
|
<if test="userId != null "> and user_id = #{userId}</if>
|
<if test="deptId != null "> and dept_id = #{deptId}</if>
|
</where>
|
</select>
|
|
<select id="selectUavWaylineById" parameterType="String" resultMap="UavWaylineResult">
|
<include refid="selectUavWaylineVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertUavWayline" parameterType="UavWayline">
|
insert into uav_wayline
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">id,</if>
|
<if test="name != null">name,</if>
|
<if test="type != null">type,</if>
|
<if test="uavModel != null">uav_model,</if>
|
<if test="payloadModel != null">payload_model,</if>
|
<if test="globalSpeed != null">global_speed,</if>
|
<if test="globalHeight != null">global_height,</if>
|
<if test="userWaypointCount != null">user_waypoint_count,</if>
|
<if test="planWaypointCount != null">plan_waypoint_count,</if>
|
<if test="srcWaylineData != null">src_wayline_data,</if>
|
<if test="planWaylineData != null">plan_wayline_data,</if>
|
<if test="kmzUrl != null">kmz_url,</if>
|
<if test="userId != null">user_id,</if>
|
<if test="deptId != null">dept_id,</if>
|
<if test="createBy != null">create_by,</if>
|
<if test="createTime != null">create_time,</if>
|
<if test="updateBy != null">update_by,</if>
|
<if test="updateTime != null">update_time,</if>
|
<if test="remark != null">remark,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="id != null">#{id},</if>
|
<if test="name != null">#{name},</if>
|
<if test="type != null">#{type},</if>
|
<if test="uavModel != null">#{uavModel},</if>
|
<if test="payloadModel != null">#{payloadModel},</if>
|
<if test="globalSpeed != null">#{globalSpeed},</if>
|
<if test="globalHeight != null">#{globalHeight},</if>
|
<if test="userWaypointCount != null">#{userWaypointCount},</if>
|
<if test="planWaypointCount != null">#{planWaypointCount},</if>
|
<if test="srcWaylineData != null">#{srcWaylineData},</if>
|
<if test="planWaylineData != null">#{planWaylineData},</if>
|
<if test="kmzUrl != null">#{kmzUrl},</if>
|
<if test="userId != null">#{userId},</if>
|
<if test="deptId != null">#{deptId},</if>
|
<if test="createBy != null">#{createBy},</if>
|
<if test="createTime != null">#{createTime},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
<if test="remark != null">#{remark},</if>
|
</trim>
|
</insert>
|
|
<update id="updateUavWayline" parameterType="UavWayline">
|
update uav_wayline
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="name != null">name = #{name},</if>
|
<if test="type != null">type = #{type},</if>
|
<if test="uavModel != null">uav_model = #{uavModel},</if>
|
<if test="payloadModel != null">payload_model = #{payloadModel},</if>
|
<if test="globalSpeed != null">global_speed = #{globalSpeed},</if>
|
<if test="globalHeight != null">global_height = #{globalHeight},</if>
|
<if test="userWaypointCount != null "> user_waypoint_count = #{userWaypointCount}</if>
|
<if test="planWaypointCount != null "> plan_waypoint_count = #{planWaypointCount}</if>
|
<if test="srcWaylineData != null "> src_wayline_data =#{srcWaylineData}</if>
|
<if test="planWaylineData != null "> plan_wayline_data = #{planWaylineData}</if>
|
<if test="kmzUrl != null">kmz_url = #{kmzUrl},</if>
|
<if test="userId != null">user_id = #{userId},</if>
|
<if test="deptId != null">dept_id = #{deptId},</if>
|
<if test="createBy != null">create_by = #{createBy},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="remark != null">remark = #{remark},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteUavWaylineById" parameterType="String">
|
delete from uav_wayline where id = #{id}
|
</delete>
|
|
<delete id="deleteUavWaylineByIds" parameterType="String">
|
delete from uav_wayline where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
|
<select id="checkUavWaylineNameUnique" parameterType="String" resultMap="UavWaylineResult">
|
select id, name from uav_wayline where name = #{name} limit 1
|
</select>
|
</mapper>
|