<?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.ltgk.boat.mapper.DsOutPortCountryMapper">
    <resultMap id="BaseResultMap" type="com.ltgk.boat.domain.entity.DsOutPortCountry">
        <!--@mbg.generated-->
        <!--@Table ds_out_port_country-->
        <id column="id" jdbcType="VARCHAR" property="id"/>
        <result column="port_id" jdbcType="VARCHAR" property="portId"/>
        <result column="boat_id" jdbcType="VARCHAR" property="boatId"/>
        <result column="update_at" jdbcType="TIMESTAMP" property="updateAt"/>
        <result column="out_time" jdbcType="TIMESTAMP" property="outTime"/>
        <result column="phone" jdbcType="VARCHAR" property="phone"/>
        <result column="crew_id" jdbcType="LONGVARCHAR" property="crewId"/>
        <result column="boat_name" jdbcType="VARCHAR" property="boatName"/>
        <result column="area_code" jdbcType="VARCHAR" property="areaCode"/>
    </resultMap>
    <sql id="Base_Column_List">
        <!--@mbg.generated-->
        id, port_id, boat_id, update_at, out_time, phone, crew_id, boat_name, area_code
    </sql>
    <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
        <!--@mbg.generated-->
        select
        <include refid="Base_Column_List"/>
        from ds_out_port_country
        where id = #{id,jdbcType=VARCHAR}
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
        <!--@mbg.generated-->
        delete from ds_out_port_country
        where id = #{id,jdbcType=VARCHAR}
    </delete>
    <insert id="insert" parameterType="com.ltgk.boat.domain.entity.DsOutPortCountry">
        <!--@mbg.generated-->
        insert into ds_out_port_country (id, port_id, boat_id,
        update_at, out_time, phone,
        crew_id, boat_name, area_code
        )
        values (#{id,jdbcType=VARCHAR}, #{portId,jdbcType=VARCHAR}, #{boatId,jdbcType=VARCHAR},
        #{updateAt,jdbcType=TIMESTAMP}, #{outTime,jdbcType=TIMESTAMP}, #{phone,jdbcType=VARCHAR},
        #{crewId,jdbcType=LONGVARCHAR}, #{boatName,jdbcType=VARCHAR}, #{areaCode,jdbcType=VARCHAR}
        )
    </insert>
    <insert id="insertSelective" parameterType="com.ltgk.boat.domain.entity.DsOutPortCountry">
        <!--@mbg.generated-->
        insert into ds_out_port_country
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">
                id,
            </if>
            <if test="portId != null">
                port_id,
            </if>
            <if test="boatId != null">
                boat_id,
            </if>
            <if test="updateAt != null">
                update_at,
            </if>
            <if test="outTime != null">
                out_time,
            </if>
            <if test="phone != null">
                phone,
            </if>
            <if test="crewId != null">
                crew_id,
            </if>
            <if test="boatName != null">
                boat_name,
            </if>
            <if test="areaCode != null">
                area_code,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">
                #{id,jdbcType=VARCHAR},
            </if>
            <if test="portId != null">
                #{portId,jdbcType=VARCHAR},
            </if>
            <if test="boatId != null">
                #{boatId,jdbcType=VARCHAR},
            </if>
            <if test="updateAt != null">
                #{updateAt,jdbcType=TIMESTAMP},
            </if>
            <if test="outTime != null">
                #{outTime,jdbcType=TIMESTAMP},
            </if>
            <if test="phone != null">
                #{phone,jdbcType=VARCHAR},
            </if>
            <if test="crewId != null">
                #{crewId,jdbcType=LONGVARCHAR},
            </if>
            <if test="boatName != null">
                #{boatName,jdbcType=VARCHAR},
            </if>
            <if test="areaCode != null">
                #{areaCode,jdbcType=VARCHAR},
            </if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.ltgk.boat.domain.entity.DsOutPortCountry">
        <!--@mbg.generated-->
        update ds_out_port_country
        <set>
            <if test="portId != null">
                port_id = #{portId,jdbcType=VARCHAR},
            </if>
            <if test="boatId != null">
                boat_id = #{boatId,jdbcType=VARCHAR},
            </if>
            <if test="updateAt != null">
                update_at = #{updateAt,jdbcType=TIMESTAMP},
            </if>
            <if test="outTime != null">
                out_time = #{outTime,jdbcType=TIMESTAMP},
            </if>
            <if test="phone != null">
                phone = #{phone,jdbcType=VARCHAR},
            </if>
            <if test="crewId != null">
                crew_id = #{crewId,jdbcType=LONGVARCHAR},
            </if>
            <if test="boatName != null">
                boat_name = #{boatName,jdbcType=VARCHAR},
            </if>
            <if test="areaCode != null">
                area_code = #{areaCode,jdbcType=VARCHAR},
            </if>
        </set>
        where id = #{id,jdbcType=VARCHAR}
    </update>
    <update id="updateByPrimaryKey" parameterType="com.ltgk.boat.domain.entity.DsOutPortCountry">
        <!--@mbg.generated-->
        update ds_out_port_country
        set port_id = #{portId,jdbcType=VARCHAR},
        boat_id = #{boatId,jdbcType=VARCHAR},
        update_at = #{updateAt,jdbcType=TIMESTAMP},
        out_time = #{outTime,jdbcType=TIMESTAMP},
        phone = #{phone,jdbcType=VARCHAR},
        crew_id = #{crewId,jdbcType=LONGVARCHAR},
        boat_name = #{boatName,jdbcType=VARCHAR},
        area_code = #{areaCode,jdbcType=VARCHAR}
        where id = #{id,jdbcType=VARCHAR}
    </update>
</mapper>