|
@@ -3,33 +3,53 @@
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.phm.manage.mapper.SortieMapper">
|
|
|
-
|
|
|
<resultMap type="Sortie" id="SortieResult">
|
|
|
- <result property="id" column="id" />
|
|
|
- <result property="aircraftNumber" column="aircraft_number" />
|
|
|
- <result property="sortieNumber" column="sortie_number" />
|
|
|
- <result property="startTime" column="start_time" />
|
|
|
- <result property="endTime" column="end_time" />
|
|
|
- <result property="duration" column="duration" />
|
|
|
- <result property="isDelete" column="is_delete" />
|
|
|
- <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="id" column="id"/>
|
|
|
+ <result property="aircraftNumber" column="aircraft_number"/>
|
|
|
+ <result property="sortieNumber" column="sortie_number"/>
|
|
|
+ <result property="startTime" column="start_time"/>
|
|
|
+ <result property="endTime" column="end_time"/>
|
|
|
+ <result property="duration" column="duration"/>
|
|
|
+ <result property="isDelete" column="is_delete"/>
|
|
|
+ <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="selectSortieVo">
|
|
|
- select id, aircraft_number, sortie_number, start_time, end_time, duration, is_delete, create_by, create_time, update_by, update_time from phm_sortie
|
|
|
+ select id,
|
|
|
+ aircraft_number,
|
|
|
+ sortie_number,
|
|
|
+ start_time,
|
|
|
+ end_time,
|
|
|
+ duration,
|
|
|
+ is_delete,
|
|
|
+ create_by,
|
|
|
+ create_time,
|
|
|
+ update_by,
|
|
|
+ update_time
|
|
|
+ from phm_sortie
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectSortieList" parameterType="Sortie" resultMap="SortieResult">
|
|
|
<include refid="selectSortieVo"/>
|
|
|
<where>
|
|
|
- <if test="aircraftNumber != null and aircraftNumber != ''"> and aircraft_number = #{aircraftNumber}</if>
|
|
|
- <if test="sortieNumber != null and sortieNumber != ''"> and sortie_number = #{sortieNumber}</if>
|
|
|
- <if test="startTime != null and startTime != ''"> and start_time = #{startTime}</if>
|
|
|
- <if test="endTime != null and endTime != ''"> and end_time = #{endTime}</if>
|
|
|
- <if test="duration != null and duration != ''"> and duration = #{duration}</if>
|
|
|
+ <if test="aircraftNumber != null and aircraftNumber != ''">
|
|
|
+ and aircraft_number = #{aircraftNumber}
|
|
|
+ </if>
|
|
|
+ <if test="sortieNumber != null and sortieNumber != ''">
|
|
|
+ and sortie_number = #{sortieNumber}
|
|
|
+ </if>
|
|
|
+ <if test="startTime != null and startTime != ''">
|
|
|
+ and start_time = #{startTime}
|
|
|
+ </if>
|
|
|
+ <if test="endTime != null and endTime != ''">
|
|
|
+ and end_time = #{endTime}
|
|
|
+ </if>
|
|
|
+ <if test="duration != null and duration != ''">
|
|
|
+ and duration = #{duration}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
@@ -43,53 +63,121 @@
|
|
|
where sortie_number = #{sortieNumber}
|
|
|
</select>
|
|
|
|
|
|
- <insert id="insertSortie" parameterType="Sortie" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ <insert id="insertSortie" parameterType="Sortie">
|
|
|
insert into phm_sortie
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="aircraftNumber != null">aircraft_number,</if>
|
|
|
- <if test="sortieNumber != null">sortie_number,</if>
|
|
|
- <if test="startTime != null">start_time,</if>
|
|
|
- <if test="endTime != null">end_time,</if>
|
|
|
- <if test="duration != null">duration,</if>
|
|
|
- <if test="isDelete != null">is_delete,</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="id != null">
|
|
|
+ id,
|
|
|
+ </if>
|
|
|
+ <if test="aircraftNumber != null">
|
|
|
+ aircraft_number,
|
|
|
+ </if>
|
|
|
+ <if test="sortieNumber != null">
|
|
|
+ sortie_number,
|
|
|
+ </if>
|
|
|
+ <if test="startTime != null">
|
|
|
+ start_time,
|
|
|
+ </if>
|
|
|
+ <if test="endTime != null">
|
|
|
+ end_time,
|
|
|
+ </if>
|
|
|
+ <if test="duration != null">
|
|
|
+ duration,
|
|
|
+ </if>
|
|
|
+ <if test="isDelete != null">
|
|
|
+ is_delete,
|
|
|
+ </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="aircraftNumber != null">#{aircraftNumber},</if>
|
|
|
- <if test="sortieNumber != null">#{sortieNumber},</if>
|
|
|
- <if test="startTime != null">#{startTime},</if>
|
|
|
- <if test="endTime != null">#{endTime},</if>
|
|
|
- <if test="duration != null">#{duration},</if>
|
|
|
- <if test="isDelete != null">#{isDelete},</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="id != null">
|
|
|
+ #{id},
|
|
|
+ </if>
|
|
|
+ <if test="aircraftNumber != null">
|
|
|
+ #{aircraftNumber},
|
|
|
+ </if>
|
|
|
+ <if test="sortieNumber != null">
|
|
|
+ #{sortieNumber},
|
|
|
+ </if>
|
|
|
+ <if test="startTime != null">
|
|
|
+ #{startTime},
|
|
|
+ </if>
|
|
|
+ <if test="endTime != null">
|
|
|
+ #{endTime},
|
|
|
+ </if>
|
|
|
+ <if test="duration != null">
|
|
|
+ #{duration},
|
|
|
+ </if>
|
|
|
+ <if test="isDelete != null">
|
|
|
+ #{isDelete},
|
|
|
+ </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="updateSortie" parameterType="Sortie">
|
|
|
update phm_sortie
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
- <if test="aircraftNumber != null">aircraft_number = #{aircraftNumber},</if>
|
|
|
- <if test="sortieNumber != null">sortie_number = #{sortieNumber},</if>
|
|
|
- <if test="startTime != null">start_time = #{startTime},</if>
|
|
|
- <if test="endTime != null">end_time = #{endTime},</if>
|
|
|
- <if test="duration != null">duration = #{duration},</if>
|
|
|
- <if test="isDelete != null">is_delete = #{isDelete},</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="aircraftNumber != null">
|
|
|
+ aircraft_number = #{aircraftNumber},
|
|
|
+ </if>
|
|
|
+ <if test="sortieNumber != null">
|
|
|
+ sortie_number = #{sortieNumber},
|
|
|
+ </if>
|
|
|
+ <if test="startTime != null">
|
|
|
+ start_time = #{startTime},
|
|
|
+ </if>
|
|
|
+ <if test="endTime != null">
|
|
|
+ end_time = #{endTime},
|
|
|
+ </if>
|
|
|
+ <if test="duration != null">
|
|
|
+ duration = #{duration},
|
|
|
+ </if>
|
|
|
+ <if test="isDelete != null">
|
|
|
+ is_delete = #{isDelete},
|
|
|
+ </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="deleteSortieById" parameterType="Long">
|
|
|
- delete from phm_sortie where id = #{id}
|
|
|
+ delete
|
|
|
+ from phm_sortie
|
|
|
+ where id = #{id}
|
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteSortieByIds" parameterType="String">
|