<?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.route.mapper.ArdRouteInformationMapper">
|
|
<resultMap type="ArdRouteInformation" id="ArdRouteInformationResult">
|
<result property="id" column="id" />
|
<result property="fileName" column="file_name" />
|
<result property="fileNameNew" column="file_name_new" />
|
<result property="upPath" column="up_path" />
|
<result property="minioUpPath" column="minio_up_path" />
|
<result property="upFileSize" column="up_file_size" />
|
<result property="folderId" column="folder_id" />
|
<result property="routeType" column="route_type" />
|
<result property="aircraft" column="aircraft" />
|
<result property="aircraftModel" column="aircraft_model" />
|
<result property="routeData" column="route_data" />
|
<result property="createBy" column="create_by" />
|
<result property="createTime" column="create_time" />
|
<result property="updateBy" column="update_by" />
|
<result property="updateTime" column="update_time" />
|
</resultMap>
|
|
<sql id="selectArdRouteInformationVo">
|
select id,
|
file_name,
|
file_name_new,
|
up_path,
|
minio_up_path,
|
up_file_size,
|
folder_id,
|
route_type,
|
aircraft,
|
aircraft_model,
|
route_data,
|
create_by,
|
create_time,
|
update_by,
|
update_time
|
from ard_route_information
|
</sql>
|
|
<select id="selectArdRouteInformationList" parameterType="ArdRouteInformation" resultMap="ArdRouteInformationResult">
|
<include refid="selectArdRouteInformationVo"/>
|
<where>
|
<if test="fileName != null and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
|
<if test="aircraft != null and aircraft != ''"> and aircraft = #{aircraft}</if>
|
<if test="aircraftModel != null and aircraftModel != ''"> and aircraft_model = #{aircraftModel}</if>
|
<if test="routeType != null and routeType != ''"> and route_type = #{routeType}</if>
|
<if test="upPath != null and upPath != ''"> and up_path = #{upPath}</if>
|
<if test="upFileSize != null "> and up_file_size = #{upFileSize}</if>
|
</where>
|
</select>
|
|
<select id="selectArdRouteInformationById" parameterType="String" resultMap="ArdRouteInformationResult">
|
<include refid="selectArdRouteInformationVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertArdRouteInformation" parameterType="ArdRouteInformation">
|
insert into ard_route_information
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">id,</if>
|
<if test="fileName != null">file_name,</if>
|
<if test="fileNameNew != null">file_name_new,</if>
|
<if test="upPath != null">up_path,</if>
|
<if test="minioUpPath != null">minio_up_path,</if>
|
<if test="upFileSize != null">up_file_size,</if>
|
<if test="folderId != null">folder_id,</if>
|
<if test="routeType != null">route_type,</if>
|
<if test="aircraft != null">aircraft,</if>
|
<if test="aircraftModel != null">aircraft_model,</if>
|
<if test="routeData != null">route_data,</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>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="id != null">#{id},</if>
|
<if test="fileName != null">#{fileName},</if>
|
<if test="fileNameNew != null">#{fileNameNew},</if>
|
<if test="upPath != null">#{upPath},</if>
|
<if test="minioUpPath != null">#{minioUpPath},</if>
|
<if test="upFileSize != null">#{upFileSize},</if>
|
<if test="folderId != null">#{folderId},</if>
|
<if test="routeType != null">#{routeType},</if>
|
<if test="aircraft != null">#{aircraft},</if>
|
<if test="aircraftModel != null">#{aircraftModel},</if>
|
<if test="routeData != null">#{routeData},</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>
|
</trim>
|
</insert>
|
|
<update id="updateArdRouteInformation" parameterType="ArdRouteInformation">
|
update ard_route_information
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="fileName != null">file_name = #{fileName},</if>
|
<if test="fileNameNew != null">file_name_new = #{fileNameNew},</if>
|
<if test="upPath != null">up_path = #{upPath},</if>
|
<if test="minioUpPath != null">minio_up_path = #{minioUpPath},</if>
|
<if test="upFileSize != null">up_file_size = #{upFileSize},</if>
|
<if test="folderId != null">folder_id = #{folderId},</if>
|
<if test="routeType != null">route_type = #{routeType},</if>
|
<if test="aircraft != null">aircraft = #{aircraft},</if>
|
<if test="aircraftModel != null">aircraft_model = #{aircraftModel},</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>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteArdRouteInformationById" parameterType="String">
|
delete from ard_route_information where id = #{id}
|
</delete>
|
|
<delete id="deleteArdRouteInformationByIds" parameterType="String">
|
delete from ard_route_information where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
|
<select id="selectArdRouteInformationByName" parameterType="String" resultMap="ArdRouteInformationResult">
|
<include refid="selectArdRouteInformationVo"/>
|
where file_name = #{fileName}
|
</select>
|
|
<delete id="deleteRouteInformationByFolderIds" parameterType="String">
|
delete from ard_route_information where folder_id in
|
<foreach item="folderId" collection="array" open="(" separator="," close=")">
|
#{folderId}
|
</foreach>
|
</delete>
|
|
<select id="selectArdRouteInformationByFolderId" parameterType="String" resultMap="ArdRouteInformationResult">
|
<include refid="selectArdRouteInformationVo"/>
|
<where>
|
<if test="folderId != null "> and folder_id = #{folderId}</if>
|
</where>
|
</select>
|
|
<update id="updateRouteInformationFolderId">
|
update ard_route_information
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="folderId != null">folder_id = #{folderId},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
</mapper>
|