LandRoadTrailerRecordMapper.xml 12.4 KB
<?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.sunyo.wlpt.vehicle.manage.mapper.LandRoadTrailerRecordMapper">
    <cache type="com.sunyo.wlpt.vehicle.manage.cache.RedisCache"/>
<!--    <cache-ref namespace="com.sunyo.wlpt.vehicle.manage.mapper.LandRoadVeRecordMapper"/>-->
    <resultMap id="BaseResultMap" type="com.sunyo.wlpt.vehicle.manage.domain.LandRoadTrailerRecord">
        <!--@mbg.generated-->
        <!--@Table land_road_trailer_record-->
        <id column="ID" jdbcType="VARCHAR" property="id"/>
    <result column="EPORT_ID" jdbcType="VARCHAR" property="eportId"/>
    <result column="MAIN_PORT" jdbcType="VARCHAR" property="mainPort"/>
    <result column="TRAILER_LICENSE_NO" jdbcType="VARCHAR" property="trailerLicenseNo"/>
    <result column="TRAILER_REG_PLACE" jdbcType="VARCHAR" property="trailerRegPlace"/>
    <result column="FRAME_NO" jdbcType="VARCHAR" property="frameNo"/>
    <result column="TRAILER_WT" jdbcType="VARCHAR" property="trailerWt"/>
    <result column="TRAILER_COLOR" jdbcType="VARCHAR" property="trailerColor"/>
    <result column="VE_CON_PIC" jdbcType="VARCHAR" property="veConPic"/>
    <result column="PROPOSER" jdbcType="VARCHAR" property="proposer"/>
    <result column="PROPOSE_TIME" jdbcType="TIMESTAMP" property="proposeTime"/>
    <result column="TRAILER_CLASS_FLAG" jdbcType="VARCHAR" property="trailerClassFlag"/>
    <result column="OPERATION_TYPE" jdbcType="VARCHAR" property="operationType"/>
    <result column="TRAILER_LICENSE_NO_PIC" jdbcType="VARCHAR" property="trailerLicenseNoPic"/>
    <result column="RETURNMESSAGE" jdbcType="VARCHAR" property="returnmessage"/>
    <result column="CREATE_BY" jdbcType="VARCHAR" property="createBy"/>
    <result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate"/>
    <result column="UPDATE_BY" jdbcType="VARCHAR" property="updateBy"/>
    <result column="UPDATE_DATE" jdbcType="TIMESTAMP" property="updateDate"/>
    </resultMap>
  <sql id="Base_Column_List">
      <!--@mbg.generated-->
      ID, EPORT_ID, MAIN_PORT, TRAILER_LICENSE_NO, TRAILER_REG_PLACE, FRAME_NO, TRAILER_WT,
    TRAILER_COLOR, VE_CON_PIC, PROPOSER, PROPOSE_TIME, TRAILER_CLASS_FLAG, OPERATION_TYPE, 
    TRAILER_LICENSE_NO_PIC, RETURNMESSAGE, CREATE_BY, CREATE_DATE, UPDATE_BY, UPDATE_DATE
  </sql>

  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
      <!--@mbg.generated-->
      select
      <include refid="Base_Column_List"/>
      from land_road_trailer_record
      where ID = #{id,jdbcType=VARCHAR}
  </select>

    <!-- 用于分页查询 -->
    <select id="selectListByPage" parameterType="com.sunyo.wlpt.vehicle.manage.domain.LandRoadTrailerRecord" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"/>
        from land_road_trailer_record
        <where>
            <!-- 挂车车牌号 -->
            <if test="trailerLicenseNo != null and trailerLicenseNo != ''">
                TRAILER_LICENSE_NO = #{trailerLicenseNo,jdbcType=VARCHAR}
            </if>
        </where>
    </select>

    <!-- 用于查询车牌号,是否唯一? -->
    <select id="selectByTrailerLicenseNo" parameterType="java.lang.String" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"/>
        from land_road_trailer_record
        where TRAILER_LICENSE_NO = #{trailerLicenseNo,jdbcType=VARCHAR}
    </select>

  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
      <!--@mbg.generated-->
      delete
      from land_road_trailer_record
      where ID = #{id,jdbcType=VARCHAR}
  </delete>

  <delete id="batchRemoveByIds" parameterType="java.lang.String">
      <!--@mbg.generated-->
      delete
      from land_road_trailer_record
              where ID in
      <foreach collection="array" open="(" close=")" separator="," item="id">
          #{id,jdbcType=VARCHAR}
      </foreach>
  </delete>

  <insert id="insert" parameterType="com.sunyo.wlpt.vehicle.manage.domain.LandRoadTrailerRecord">
      <!--@mbg.generated-->
      insert into land_road_trailer_record (ID, EPORT_ID, MAIN_PORT,
                                            TRAILER_LICENSE_NO, TRAILER_REG_PLACE, FRAME_NO,
                                            TRAILER_WT, TRAILER_COLOR, VE_CON_PIC,
                                            PROPOSER, PROPOSE_TIME, TRAILER_CLASS_FLAG,
                                            OPERATION_TYPE, TRAILER_LICENSE_NO_PIC, RETURNMESSAGE,
                                            CREATE_BY, CREATE_DATE, UPDATE_BY,
                                            UPDATE_DATE)
      values (#{id,jdbcType=VARCHAR}, #{eportId,jdbcType=VARCHAR}, #{mainPort,jdbcType=VARCHAR},
              #{trailerLicenseNo,jdbcType=VARCHAR}, #{trailerRegPlace,jdbcType=VARCHAR}, #{frameNo,jdbcType=VARCHAR},
              #{trailerWt,jdbcType=VARCHAR}, #{trailerColor,jdbcType=VARCHAR}, #{veConPic,jdbcType=VARCHAR},
              #{proposer,jdbcType=VARCHAR}, #{proposeTime,jdbcType=TIMESTAMP}, #{trailerClassFlag,jdbcType=VARCHAR},
              #{operationType,jdbcType=VARCHAR}, #{trailerLicenseNoPic,jdbcType=VARCHAR}, #{returnmessage,jdbcType=VARCHAR},
              #{createBy,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
              #{updateDate,jdbcType=TIMESTAMP})
  </insert>

  <insert id="insertSelective" parameterType="com.sunyo.wlpt.vehicle.manage.domain.LandRoadTrailerRecord">
      <!--@mbg.generated-->
      insert into land_road_trailer_record
      <trim prefix="(" suffix=")" suffixOverrides=",">
          <if test="id != null">
              ID,
          </if>
      <if test="eportId != null">
          EPORT_ID,
      </if>
      <if test="mainPort != null">
          MAIN_PORT,
      </if>
      <if test="trailerLicenseNo != null">
          TRAILER_LICENSE_NO,
      </if>
      <if test="trailerRegPlace != null">
          TRAILER_REG_PLACE,
      </if>
      <if test="frameNo != null">
          FRAME_NO,
      </if>
      <if test="trailerWt != null">
          TRAILER_WT,
      </if>
      <if test="trailerColor != null">
          TRAILER_COLOR,
      </if>
      <if test="veConPic != null">
          VE_CON_PIC,
      </if>
      <if test="proposer != null">
          PROPOSER,
      </if>
      <if test="proposeTime != null">
          PROPOSE_TIME,
      </if>
      <if test="trailerClassFlag != null">
          TRAILER_CLASS_FLAG,
      </if>
      <if test="operationType != null">
          OPERATION_TYPE,
      </if>
      <if test="trailerLicenseNoPic != null">
          TRAILER_LICENSE_NO_PIC,
      </if>
      <if test="returnmessage != null">
          RETURNMESSAGE,
      </if>
      <if test="createBy != null">
          CREATE_BY,
      </if>
      <if test="createDate != null">
          CREATE_DATE,
      </if>
      <if test="updateBy != null">
          UPDATE_BY,
      </if>
      <if test="updateDate != null">
          UPDATE_DATE,
      </if>
      </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
        <if test="id != null">
            #{id,jdbcType=VARCHAR},
        </if>
      <if test="eportId != null">
          #{eportId,jdbcType=VARCHAR},
      </if>
      <if test="mainPort != null">
          #{mainPort,jdbcType=VARCHAR},
      </if>
      <if test="trailerLicenseNo != null">
          #{trailerLicenseNo,jdbcType=VARCHAR},
      </if>
      <if test="trailerRegPlace != null">
          #{trailerRegPlace,jdbcType=VARCHAR},
      </if>
      <if test="frameNo != null">
          #{frameNo,jdbcType=VARCHAR},
      </if>
      <if test="trailerWt != null">
          #{trailerWt,jdbcType=VARCHAR},
      </if>
      <if test="trailerColor != null">
          #{trailerColor,jdbcType=VARCHAR},
      </if>
      <if test="veConPic != null">
          #{veConPic,jdbcType=VARCHAR},
      </if>
      <if test="proposer != null">
          #{proposer,jdbcType=VARCHAR},
      </if>
      <if test="proposeTime != null">
          #{proposeTime,jdbcType=TIMESTAMP},
      </if>
      <if test="trailerClassFlag != null">
          #{trailerClassFlag,jdbcType=VARCHAR},
      </if>
      <if test="operationType != null">
          #{operationType,jdbcType=VARCHAR},
      </if>
      <if test="trailerLicenseNoPic != null">
          #{trailerLicenseNoPic,jdbcType=VARCHAR},
      </if>
      <if test="returnmessage != null">
          #{returnmessage,jdbcType=VARCHAR},
      </if>
      <if test="createBy != null">
          #{createBy,jdbcType=VARCHAR},
      </if>
      <if test="createDate != null">
          #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="updateBy != null">
          #{updateBy,jdbcType=VARCHAR},
      </if>
      <if test="updateDate != null">
          #{updateDate,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.wlpt.vehicle.manage.domain.LandRoadTrailerRecord">
      <!--@mbg.generated-->
      update land_road_trailer_record
      <set>
          <if test="eportId != null">
              EPORT_ID = #{eportId,jdbcType=VARCHAR},
          </if>
      <if test="mainPort != null">
          MAIN_PORT = #{mainPort,jdbcType=VARCHAR},
      </if>
      <if test="trailerLicenseNo != null">
          TRAILER_LICENSE_NO = #{trailerLicenseNo,jdbcType=VARCHAR},
      </if>
      <if test="trailerRegPlace != null">
          TRAILER_REG_PLACE = #{trailerRegPlace,jdbcType=VARCHAR},
      </if>
      <if test="frameNo != null">
          FRAME_NO = #{frameNo,jdbcType=VARCHAR},
      </if>
      <if test="trailerWt != null">
          TRAILER_WT = #{trailerWt,jdbcType=VARCHAR},
      </if>
      <if test="trailerColor != null">
          TRAILER_COLOR = #{trailerColor,jdbcType=VARCHAR},
      </if>
      <if test="veConPic != null">
          VE_CON_PIC = #{veConPic,jdbcType=VARCHAR},
      </if>
      <if test="proposer != null">
          PROPOSER = #{proposer,jdbcType=VARCHAR},
      </if>
      <if test="proposeTime != null">
          PROPOSE_TIME = #{proposeTime,jdbcType=TIMESTAMP},
      </if>
      <if test="trailerClassFlag != null">
          TRAILER_CLASS_FLAG = #{trailerClassFlag,jdbcType=VARCHAR},
      </if>
      <if test="operationType != null">
          OPERATION_TYPE = #{operationType,jdbcType=VARCHAR},
      </if>
      <if test="trailerLicenseNoPic != null">
          TRAILER_LICENSE_NO_PIC = #{trailerLicenseNoPic,jdbcType=VARCHAR},
      </if>
      <if test="returnmessage != null">
          RETURNMESSAGE = #{returnmessage,jdbcType=VARCHAR},
      </if>
      <if test="createBy != null">
          CREATE_BY = #{createBy,jdbcType=VARCHAR},
      </if>
      <if test="createDate != null">
          CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="updateBy != null">
          UPDATE_BY = #{updateBy,jdbcType=VARCHAR},
      </if>
      <if test="updateDate != null">
          UPDATE_DATE = #{updateDate,jdbcType=TIMESTAMP},
      </if>
      </set>
      where ID = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.sunyo.wlpt.vehicle.manage.domain.LandRoadTrailerRecord">
      <!--@mbg.generated-->
      update land_road_trailer_record
      set EPORT_ID               = #{eportId,jdbcType=VARCHAR},
          MAIN_PORT              = #{mainPort,jdbcType=VARCHAR},
          TRAILER_LICENSE_NO     = #{trailerLicenseNo,jdbcType=VARCHAR},
          TRAILER_REG_PLACE      = #{trailerRegPlace,jdbcType=VARCHAR},
          FRAME_NO               = #{frameNo,jdbcType=VARCHAR},
          TRAILER_WT             = #{trailerWt,jdbcType=VARCHAR},
          TRAILER_COLOR          = #{trailerColor,jdbcType=VARCHAR},
          VE_CON_PIC             = #{veConPic,jdbcType=VARCHAR},
          PROPOSER               = #{proposer,jdbcType=VARCHAR},
          PROPOSE_TIME           = #{proposeTime,jdbcType=TIMESTAMP},
          TRAILER_CLASS_FLAG     = #{trailerClassFlag,jdbcType=VARCHAR},
          OPERATION_TYPE         = #{operationType,jdbcType=VARCHAR},
          TRAILER_LICENSE_NO_PIC = #{trailerLicenseNoPic,jdbcType=VARCHAR},
          RETURNMESSAGE          = #{returnmessage,jdbcType=VARCHAR},
          CREATE_BY              = #{createBy,jdbcType=VARCHAR},
          CREATE_DATE            = #{createDate,jdbcType=TIMESTAMP},
          UPDATE_BY              = #{updateBy,jdbcType=VARCHAR},
          UPDATE_DATE            = #{updateDate,jdbcType=TIMESTAMP}
      where ID = #{id,jdbcType=VARCHAR}
  </update>
</mapper>