TpPTgsPassedcarMapper.xml 15.6 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.zteits.park.mapper.TpPTgsPassedcarMapper">
  <resultMap id="BaseResultMap" type="com.zteits.park.domain.TpPTgsPassedcar">
    <id column="NID" jdbcType="INTEGER" property="nid" />
    <result column="CLICENSETYPE" jdbcType="VARCHAR" property="clicensetype" />
    <result column="CCARNUMBER" jdbcType="VARCHAR" property="ccarnumber" />
    <result column="DCOLLECTIONDATE" jdbcType="TIMESTAMP" property="dcollectiondate" />
    <result column="CADDRESSCODE" jdbcType="VARCHAR" property="caddresscode" />
    <result column="CCOLLECTIONADDRESS" jdbcType="VARCHAR" property="ccollectionaddress" />
    <result column="CCOLLECTIONAGENCIES" jdbcType="VARCHAR" property="ccollectionagencies" />
    <result column="CDATASOURCE" jdbcType="VARCHAR" property="cdatasource" />
    <result column="CSNAPTYPE" jdbcType="CHAR" property="csnaptype" />
    <result column="CDEVICECODE" jdbcType="VARCHAR" property="cdevicecode" />
    <result column="CLANENUMBER" jdbcType="VARCHAR" property="clanenumber" />
    <result column="NVEHICLESPEED" jdbcType="INTEGER" property="nvehiclespeed" />
    <result column="CPIC1PATH" jdbcType="VARCHAR" property="cpic1path" />
    <result column="CPIC2PATH" jdbcType="VARCHAR" property="cpic2path" />
    <result column="CPIC3PATH" jdbcType="VARCHAR" property="cpic3path" />
    <result column="NDERICTRION" jdbcType="INTEGER" property="nderictrion" />
    <result column="ISILL" jdbcType="CHAR" property="isill" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <where>
      <foreach collection="oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause">
    <where>
      <foreach collection="example.oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    NID, CLICENSETYPE, CCARNUMBER, DCOLLECTIONDATE, CADDRESSCODE, CCOLLECTIONADDRESS, 
    CCOLLECTIONAGENCIES, CDATASOURCE, CSNAPTYPE, CDEVICECODE, CLANENUMBER, NVEHICLESPEED, 
    CPIC1PATH, CPIC2PATH, CPIC3PATH, NDERICTRION, ISILL
  </sql>
  <select id="selectByExample" parameterType="com.zteits.park.domain.TpPTgsPassedcarExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from tp_p_tgs_passedcar
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tp_p_tgs_passedcar
    where NID = #{nid,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from tp_p_tgs_passedcar
    where NID = #{nid,jdbcType=INTEGER}
  </delete>
  <delete id="deleteByExample" parameterType="com.zteits.park.domain.TpPTgsPassedcarExample">
    delete from tp_p_tgs_passedcar
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.zteits.park.domain.TpPTgsPassedcar">
    <selectKey keyProperty="nid" order="AFTER" resultType="java.lang.Integer">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into tp_p_tgs_passedcar (CLICENSETYPE, CCARNUMBER, DCOLLECTIONDATE, 
      CADDRESSCODE, CCOLLECTIONADDRESS, CCOLLECTIONAGENCIES, 
      CDATASOURCE, CSNAPTYPE, CDEVICECODE, 
      CLANENUMBER, NVEHICLESPEED, CPIC1PATH, 
      CPIC2PATH, CPIC3PATH, NDERICTRION, 
      ISILL)
    values (#{clicensetype,jdbcType=VARCHAR}, #{ccarnumber,jdbcType=VARCHAR}, #{dcollectiondate,jdbcType=TIMESTAMP}, 
      #{caddresscode,jdbcType=VARCHAR}, #{ccollectionaddress,jdbcType=VARCHAR}, #{ccollectionagencies,jdbcType=VARCHAR}, 
      #{cdatasource,jdbcType=VARCHAR}, #{csnaptype,jdbcType=CHAR}, #{cdevicecode,jdbcType=VARCHAR}, 
      #{clanenumber,jdbcType=VARCHAR}, #{nvehiclespeed,jdbcType=INTEGER}, #{cpic1path,jdbcType=VARCHAR}, 
      #{cpic2path,jdbcType=VARCHAR}, #{cpic3path,jdbcType=VARCHAR}, #{nderictrion,jdbcType=INTEGER}, 
      #{isill,jdbcType=CHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.park.domain.TpPTgsPassedcar">
    <selectKey keyProperty="nid" order="AFTER" resultType="java.lang.Integer">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into tp_p_tgs_passedcar
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="clicensetype != null">
        CLICENSETYPE,
      </if>
      <if test="ccarnumber != null">
        CCARNUMBER,
      </if>
      <if test="dcollectiondate != null">
        DCOLLECTIONDATE,
      </if>
      <if test="caddresscode != null">
        CADDRESSCODE,
      </if>
      <if test="ccollectionaddress != null">
        CCOLLECTIONADDRESS,
      </if>
      <if test="ccollectionagencies != null">
        CCOLLECTIONAGENCIES,
      </if>
      <if test="cdatasource != null">
        CDATASOURCE,
      </if>
      <if test="csnaptype != null">
        CSNAPTYPE,
      </if>
      <if test="cdevicecode != null">
        CDEVICECODE,
      </if>
      <if test="clanenumber != null">
        CLANENUMBER,
      </if>
      <if test="nvehiclespeed != null">
        NVEHICLESPEED,
      </if>
      <if test="cpic1path != null">
        CPIC1PATH,
      </if>
      <if test="cpic2path != null">
        CPIC2PATH,
      </if>
      <if test="cpic3path != null">
        CPIC3PATH,
      </if>
      <if test="nderictrion != null">
        NDERICTRION,
      </if>
      <if test="isill != null">
        ISILL,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="clicensetype != null">
        #{clicensetype,jdbcType=VARCHAR},
      </if>
      <if test="ccarnumber != null">
        #{ccarnumber,jdbcType=VARCHAR},
      </if>
      <if test="dcollectiondate != null">
        #{dcollectiondate,jdbcType=TIMESTAMP},
      </if>
      <if test="caddresscode != null">
        #{caddresscode,jdbcType=VARCHAR},
      </if>
      <if test="ccollectionaddress != null">
        #{ccollectionaddress,jdbcType=VARCHAR},
      </if>
      <if test="ccollectionagencies != null">
        #{ccollectionagencies,jdbcType=VARCHAR},
      </if>
      <if test="cdatasource != null">
        #{cdatasource,jdbcType=VARCHAR},
      </if>
      <if test="csnaptype != null">
        #{csnaptype,jdbcType=CHAR},
      </if>
      <if test="cdevicecode != null">
        #{cdevicecode,jdbcType=VARCHAR},
      </if>
      <if test="clanenumber != null">
        #{clanenumber,jdbcType=VARCHAR},
      </if>
      <if test="nvehiclespeed != null">
        #{nvehiclespeed,jdbcType=INTEGER},
      </if>
      <if test="cpic1path != null">
        #{cpic1path,jdbcType=VARCHAR},
      </if>
      <if test="cpic2path != null">
        #{cpic2path,jdbcType=VARCHAR},
      </if>
      <if test="cpic3path != null">
        #{cpic3path,jdbcType=VARCHAR},
      </if>
      <if test="nderictrion != null">
        #{nderictrion,jdbcType=INTEGER},
      </if>
      <if test="isill != null">
        #{isill,jdbcType=CHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.zteits.park.domain.TpPTgsPassedcarExample" resultType="java.lang.Long">
    select count(*) from tp_p_tgs_passedcar
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update tp_p_tgs_passedcar
    <set>
      <if test="record.nid != null">
        NID = #{record.nid,jdbcType=INTEGER},
      </if>
      <if test="record.clicensetype != null">
        CLICENSETYPE = #{record.clicensetype,jdbcType=VARCHAR},
      </if>
      <if test="record.ccarnumber != null">
        CCARNUMBER = #{record.ccarnumber,jdbcType=VARCHAR},
      </if>
      <if test="record.dcollectiondate != null">
        DCOLLECTIONDATE = #{record.dcollectiondate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.caddresscode != null">
        CADDRESSCODE = #{record.caddresscode,jdbcType=VARCHAR},
      </if>
      <if test="record.ccollectionaddress != null">
        CCOLLECTIONADDRESS = #{record.ccollectionaddress,jdbcType=VARCHAR},
      </if>
      <if test="record.ccollectionagencies != null">
        CCOLLECTIONAGENCIES = #{record.ccollectionagencies,jdbcType=VARCHAR},
      </if>
      <if test="record.cdatasource != null">
        CDATASOURCE = #{record.cdatasource,jdbcType=VARCHAR},
      </if>
      <if test="record.csnaptype != null">
        CSNAPTYPE = #{record.csnaptype,jdbcType=CHAR},
      </if>
      <if test="record.cdevicecode != null">
        CDEVICECODE = #{record.cdevicecode,jdbcType=VARCHAR},
      </if>
      <if test="record.clanenumber != null">
        CLANENUMBER = #{record.clanenumber,jdbcType=VARCHAR},
      </if>
      <if test="record.nvehiclespeed != null">
        NVEHICLESPEED = #{record.nvehiclespeed,jdbcType=INTEGER},
      </if>
      <if test="record.cpic1path != null">
        CPIC1PATH = #{record.cpic1path,jdbcType=VARCHAR},
      </if>
      <if test="record.cpic2path != null">
        CPIC2PATH = #{record.cpic2path,jdbcType=VARCHAR},
      </if>
      <if test="record.cpic3path != null">
        CPIC3PATH = #{record.cpic3path,jdbcType=VARCHAR},
      </if>
      <if test="record.nderictrion != null">
        NDERICTRION = #{record.nderictrion,jdbcType=INTEGER},
      </if>
      <if test="record.isill != null">
        ISILL = #{record.isill,jdbcType=CHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update tp_p_tgs_passedcar
    set NID = #{record.nid,jdbcType=INTEGER},
      CLICENSETYPE = #{record.clicensetype,jdbcType=VARCHAR},
      CCARNUMBER = #{record.ccarnumber,jdbcType=VARCHAR},
      DCOLLECTIONDATE = #{record.dcollectiondate,jdbcType=TIMESTAMP},
      CADDRESSCODE = #{record.caddresscode,jdbcType=VARCHAR},
      CCOLLECTIONADDRESS = #{record.ccollectionaddress,jdbcType=VARCHAR},
      CCOLLECTIONAGENCIES = #{record.ccollectionagencies,jdbcType=VARCHAR},
      CDATASOURCE = #{record.cdatasource,jdbcType=VARCHAR},
      CSNAPTYPE = #{record.csnaptype,jdbcType=CHAR},
      CDEVICECODE = #{record.cdevicecode,jdbcType=VARCHAR},
      CLANENUMBER = #{record.clanenumber,jdbcType=VARCHAR},
      NVEHICLESPEED = #{record.nvehiclespeed,jdbcType=INTEGER},
      CPIC1PATH = #{record.cpic1path,jdbcType=VARCHAR},
      CPIC2PATH = #{record.cpic2path,jdbcType=VARCHAR},
      CPIC3PATH = #{record.cpic3path,jdbcType=VARCHAR},
      NDERICTRION = #{record.nderictrion,jdbcType=INTEGER},
      ISILL = #{record.isill,jdbcType=CHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.park.domain.TpPTgsPassedcar">
    update tp_p_tgs_passedcar
    <set>
      <if test="clicensetype != null">
        CLICENSETYPE = #{clicensetype,jdbcType=VARCHAR},
      </if>
      <if test="ccarnumber != null">
        CCARNUMBER = #{ccarnumber,jdbcType=VARCHAR},
      </if>
      <if test="dcollectiondate != null">
        DCOLLECTIONDATE = #{dcollectiondate,jdbcType=TIMESTAMP},
      </if>
      <if test="caddresscode != null">
        CADDRESSCODE = #{caddresscode,jdbcType=VARCHAR},
      </if>
      <if test="ccollectionaddress != null">
        CCOLLECTIONADDRESS = #{ccollectionaddress,jdbcType=VARCHAR},
      </if>
      <if test="ccollectionagencies != null">
        CCOLLECTIONAGENCIES = #{ccollectionagencies,jdbcType=VARCHAR},
      </if>
      <if test="cdatasource != null">
        CDATASOURCE = #{cdatasource,jdbcType=VARCHAR},
      </if>
      <if test="csnaptype != null">
        CSNAPTYPE = #{csnaptype,jdbcType=CHAR},
      </if>
      <if test="cdevicecode != null">
        CDEVICECODE = #{cdevicecode,jdbcType=VARCHAR},
      </if>
      <if test="clanenumber != null">
        CLANENUMBER = #{clanenumber,jdbcType=VARCHAR},
      </if>
      <if test="nvehiclespeed != null">
        NVEHICLESPEED = #{nvehiclespeed,jdbcType=INTEGER},
      </if>
      <if test="cpic1path != null">
        CPIC1PATH = #{cpic1path,jdbcType=VARCHAR},
      </if>
      <if test="cpic2path != null">
        CPIC2PATH = #{cpic2path,jdbcType=VARCHAR},
      </if>
      <if test="cpic3path != null">
        CPIC3PATH = #{cpic3path,jdbcType=VARCHAR},
      </if>
      <if test="nderictrion != null">
        NDERICTRION = #{nderictrion,jdbcType=INTEGER},
      </if>
      <if test="isill != null">
        ISILL = #{isill,jdbcType=CHAR},
      </if>
    </set>
    where NID = #{nid,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.park.domain.TpPTgsPassedcar">
    update tp_p_tgs_passedcar
    set CLICENSETYPE = #{clicensetype,jdbcType=VARCHAR},
      CCARNUMBER = #{ccarnumber,jdbcType=VARCHAR},
      DCOLLECTIONDATE = #{dcollectiondate,jdbcType=TIMESTAMP},
      CADDRESSCODE = #{caddresscode,jdbcType=VARCHAR},
      CCOLLECTIONADDRESS = #{ccollectionaddress,jdbcType=VARCHAR},
      CCOLLECTIONAGENCIES = #{ccollectionagencies,jdbcType=VARCHAR},
      CDATASOURCE = #{cdatasource,jdbcType=VARCHAR},
      CSNAPTYPE = #{csnaptype,jdbcType=CHAR},
      CDEVICECODE = #{cdevicecode,jdbcType=VARCHAR},
      CLANENUMBER = #{clanenumber,jdbcType=VARCHAR},
      NVEHICLESPEED = #{nvehiclespeed,jdbcType=INTEGER},
      CPIC1PATH = #{cpic1path,jdbcType=VARCHAR},
      CPIC2PATH = #{cpic2path,jdbcType=VARCHAR},
      CPIC3PATH = #{cpic3path,jdbcType=VARCHAR},
      NDERICTRION = #{nderictrion,jdbcType=INTEGER},
      ISILL = #{isill,jdbcType=CHAR}
    where NID = #{nid,jdbcType=INTEGER}
  </update>
</mapper>