| | |
| | | |
| | | <resultMap type="ArdRoutePoint" id="ArdRoutePointResult"> |
| | | <result property="missionId" column="mission_id" /> |
| | | <result property="pointNum" column="point_num" /> |
| | | <result property="routePointIndex" column="route_point_index" /> |
| | | <result property="longitude" column="longitude" /> |
| | | <result property="latitude" column="latitude" /> |
| | | <result property="height" column="height" /> |
| | |
| | | |
| | | <sql id="selectArdRoutePointVo"> |
| | | select mission_id, |
| | | point_num, |
| | | route_point_index, |
| | | longitude, |
| | | latitude, |
| | | height |
| | |
| | | <select id="selectArdRoutePointList" parameterType="ArdRoutePoint" resultMap="ArdRoutePointResult"> |
| | | <include refid="selectArdRoutePointVo"/> |
| | | <where> |
| | | <if test="pointNum != null "> and point_num = #{pointNum}</if> |
| | | <if test="routePointIndex != null "> and route_point_index = #{routePointIndex}</if> |
| | | <if test="longitude != null "> and longitude = #{longitude}</if> |
| | | <if test="latitude != null "> and latitude = #{latitude}</if> |
| | | <if test="height != null "> and height = #{height}</if> |
| | | </where> |
| | | order by point_num asc |
| | | order by route_point_index asc |
| | | </select> |
| | | |
| | | <select id="selectArdRoutePointByMissionId" parameterType="ArdRoutePoint" resultMap="ArdRoutePointResult"> |
| | | <include refid="selectArdRoutePointVo"/> |
| | | where mission_id = #{missionId} |
| | | order by point_num asc |
| | | order by route_point_index asc |
| | | </select> |
| | | |
| | | <insert id="insertArdRoutePoint" parameterType="ArdRoutePoint"> |
| | | insert into ard_route_point |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="missionId != null">mission_id,</if> |
| | | <if test="pointNum != null">point_num,</if> |
| | | <if test="routePointIndex != null">route_point_index,</if> |
| | | <if test="longitude != null">longitude,</if> |
| | | <if test="latitude != null">latitude,</if> |
| | | <if test="height != null">height,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="missionId != null">#{missionId},</if> |
| | | <if test="pointNum != null">#{pointNum},</if> |
| | | <if test="routePointIndex != null">#{routePointIndex},</if> |
| | | <if test="longitude != null">#{longitude},</if> |
| | | <if test="latitude != null">#{latitude},</if> |
| | | <if test="height != null">#{height},</if> |
| | |
| | | <update id="updateArdRoutePoint" parameterType="ArdRoutePoint"> |
| | | update ard_route_point |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="pointNum != null">point_num = #{pointNum},</if> |
| | | <if test="routePointIndex != null">route_point_index = #{routePointIndex},</if> |
| | | <if test="longitude != null">longitude = #{longitude},</if> |
| | | <if test="latitude != null">latitude = #{latitude},</if> |
| | | <if test="height != null">height = #{height},</if> |
| | |
| | | INSERT INTO ard_route_point |
| | | ( |
| | | mission_id, |
| | | point_num, |
| | | route_point_index, |
| | | longitude, |
| | | latitude, |
| | | height |
| | |
| | | <foreach item="item" index="index" collection="list" separator=","> |
| | | ( |
| | | #{item.missionId}, |
| | | #{item.pointNum}, |
| | | #{item.routePointIndex}, |
| | | #{item.longitude}, |
| | | #{item.latitude}, |
| | | #{item.height} |