|
@@ -0,0 +1,73 @@
|
|
|
+<?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.songhua.system.mapper.CruiseShipMappingMapper">
|
|
|
+
|
|
|
+ <resultMap type="CruiseShipMapping" id="CruiseShipMappingResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="shipId" column="ship_id" />
|
|
|
+ <result property="longitude" column="longitude" />
|
|
|
+ <result property="latitude" column="latitude" />
|
|
|
+ <result property="shipTime" column="ship_time" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectCruiseShipMappingVo">
|
|
|
+ select id, ship_id, longitude, latitude, ship_time from cruise_ship_mapping
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectCruiseShipMappingList" parameterType="CruiseShipMapping" resultMap="CruiseShipMappingResult">
|
|
|
+ <include refid="selectCruiseShipMappingVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="shipId != null and shipId != ''"> and ship_id = #{shipId}</if>
|
|
|
+ <if test="longitude != null and longitude != ''"> and longitude = #{longitude}</if>
|
|
|
+ <if test="latitude != null and latitude != ''"> and latitude = #{latitude}</if>
|
|
|
+ <if test="shipTime != null "> and ship_time = #{shipTime}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectCruiseShipMappingById" parameterType="String" resultMap="CruiseShipMappingResult">
|
|
|
+ <include refid="selectCruiseShipMappingVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertCruiseShipMapping" parameterType="CruiseShipMapping">
|
|
|
+ insert into cruise_ship_mapping
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">id,</if>
|
|
|
+ <if test="shipId != null">ship_id,</if>
|
|
|
+ <if test="longitude != null">longitude,</if>
|
|
|
+ <if test="latitude != null">latitude,</if>
|
|
|
+ <if test="shipTime != null">ship_time,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">#{id},</if>
|
|
|
+ <if test="shipId != null">#{shipId},</if>
|
|
|
+ <if test="longitude != null">#{longitude},</if>
|
|
|
+ <if test="latitude != null">#{latitude},</if>
|
|
|
+ <if test="shipTime != null">#{shipTime},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateCruiseShipMapping" parameterType="CruiseShipMapping">
|
|
|
+ update cruise_ship_mapping
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="shipId != null">ship_id = #{shipId},</if>
|
|
|
+ <if test="longitude != null">longitude = #{longitude},</if>
|
|
|
+ <if test="latitude != null">latitude = #{latitude},</if>
|
|
|
+ <if test="shipTime != null">ship_time = #{shipTime},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteCruiseShipMappingById" parameterType="String">
|
|
|
+ delete from cruise_ship_mapping where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteCruiseShipMappingByIds" parameterType="String">
|
|
|
+ delete from cruise_ship_mapping where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|