TbTailNumberLimitedRuleMapper.xml 8.18 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.bill.mapper.TbTailNumberLimitedRuleMapper">
  <resultMap id="BaseResultMap" type="com.zteits.bill.domain.TbTailNumberLimitedRule">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="city_code" jdbcType="BIGINT" property="cityCode" />
    <result column="city_name" jdbcType="VARCHAR" property="cityName" />
    <result column="limit_date" jdbcType="TIMESTAMP" property="limitDate" />
    <result column="is_limit" jdbcType="INTEGER" property="isLimit" />
    <result column="num" jdbcType="VARCHAR" property="num" />
    <result column="region" jdbcType="VARCHAR" property="region" />
    <result column="penalty" jdbcType="VARCHAR" property="penalty" />
    <result column="remarks" jdbcType="VARCHAR" property="remarks" />
    <result column="data_state" jdbcType="INTEGER" property="dataState" />
    <result column="create_empid" jdbcType="BIGINT" property="createEmpid" />
    <result column="create_name" jdbcType="VARCHAR" property="createName" />
    <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
    <result column="modify_empid" jdbcType="BIGINT" property="modifyEmpid" />
    <result column="modify_name" jdbcType="VARCHAR" property="modifyName" />
    <result column="modify_date" jdbcType="TIMESTAMP" property="modifyDate" />
  </resultMap>
  <sql id="Base_Column_List">
    id, city_code, city_name, limit_date, is_limit, num, region, penalty, remarks, data_state, 
    create_empid, create_name, create_date, modify_empid, modify_name, modify_date
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tb_tail_number_limited_rule
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from tb_tail_number_limited_rule
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.zteits.bill.domain.TbTailNumberLimitedRule">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into tb_tail_number_limited_rule (city_code, city_name, limit_date, 
      is_limit, num, region, 
      penalty, remarks, data_state, 
      create_empid, create_name, create_date, 
      modify_empid, modify_name, modify_date
      )
    values (#{cityCode,jdbcType=BIGINT}, #{cityName,jdbcType=VARCHAR}, #{limitDate,jdbcType=TIMESTAMP}, 
      #{isLimit,jdbcType=INTEGER}, #{num,jdbcType=VARCHAR}, #{region,jdbcType=VARCHAR}, 
      #{penalty,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR}, #{dataState,jdbcType=INTEGER}, 
      #{createEmpid,jdbcType=BIGINT}, #{createName,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, 
      #{modifyEmpid,jdbcType=BIGINT}, #{modifyName,jdbcType=VARCHAR}, #{modifyDate,jdbcType=TIMESTAMP}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.bill.domain.TbTailNumberLimitedRule">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into tb_tail_number_limited_rule
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="cityCode != null">
        city_code,
      </if>
      <if test="cityName != null">
        city_name,
      </if>
      <if test="limitDate != null">
        limit_date,
      </if>
      <if test="isLimit != null">
        is_limit,
      </if>
      <if test="num != null">
        num,
      </if>
      <if test="region != null">
        region,
      </if>
      <if test="penalty != null">
        penalty,
      </if>
      <if test="remarks != null">
        remarks,
      </if>
      <if test="dataState != null">
        data_state,
      </if>
      <if test="createEmpid != null">
        create_empid,
      </if>
      <if test="createName != null">
        create_name,
      </if>
      <if test="createDate != null">
        create_date,
      </if>
      <if test="modifyEmpid != null">
        modify_empid,
      </if>
      <if test="modifyName != null">
        modify_name,
      </if>
      <if test="modifyDate != null">
        modify_date,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="cityCode != null">
        #{cityCode,jdbcType=BIGINT},
      </if>
      <if test="cityName != null">
        #{cityName,jdbcType=VARCHAR},
      </if>
      <if test="limitDate != null">
        #{limitDate,jdbcType=TIMESTAMP},
      </if>
      <if test="isLimit != null">
        #{isLimit,jdbcType=INTEGER},
      </if>
      <if test="num != null">
        #{num,jdbcType=VARCHAR},
      </if>
      <if test="region != null">
        #{region,jdbcType=VARCHAR},
      </if>
      <if test="penalty != null">
        #{penalty,jdbcType=VARCHAR},
      </if>
      <if test="remarks != null">
        #{remarks,jdbcType=VARCHAR},
      </if>
      <if test="dataState != null">
        #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createEmpid != null">
        #{createEmpid,jdbcType=BIGINT},
      </if>
      <if test="createName != null">
        #{createName,jdbcType=VARCHAR},
      </if>
      <if test="createDate != null">
        #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyEmpid != null">
        #{modifyEmpid,jdbcType=BIGINT},
      </if>
      <if test="modifyName != null">
        #{modifyName,jdbcType=VARCHAR},
      </if>
      <if test="modifyDate != null">
        #{modifyDate,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.bill.domain.TbTailNumberLimitedRule">
    update tb_tail_number_limited_rule
    <set>
      <if test="cityCode != null">
        city_code = #{cityCode,jdbcType=BIGINT},
      </if>
      <if test="cityName != null">
        city_name = #{cityName,jdbcType=VARCHAR},
      </if>
      <if test="limitDate != null">
        limit_date = #{limitDate,jdbcType=TIMESTAMP},
      </if>
      <if test="isLimit != null">
        is_limit = #{isLimit,jdbcType=INTEGER},
      </if>
      <if test="num != null">
        num = #{num,jdbcType=VARCHAR},
      </if>
      <if test="region != null">
        region = #{region,jdbcType=VARCHAR},
      </if>
      <if test="penalty != null">
        penalty = #{penalty,jdbcType=VARCHAR},
      </if>
      <if test="remarks != null">
        remarks = #{remarks,jdbcType=VARCHAR},
      </if>
      <if test="dataState != null">
        data_state = #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createEmpid != null">
        create_empid = #{createEmpid,jdbcType=BIGINT},
      </if>
      <if test="createName != null">
        create_name = #{createName,jdbcType=VARCHAR},
      </if>
      <if test="createDate != null">
        create_date = #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyEmpid != null">
        modify_empid = #{modifyEmpid,jdbcType=BIGINT},
      </if>
      <if test="modifyName != null">
        modify_name = #{modifyName,jdbcType=VARCHAR},
      </if>
      <if test="modifyDate != null">
        modify_date = #{modifyDate,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.bill.domain.TbTailNumberLimitedRule">
    update tb_tail_number_limited_rule
    set city_code = #{cityCode,jdbcType=BIGINT},
      city_name = #{cityName,jdbcType=VARCHAR},
      limit_date = #{limitDate,jdbcType=TIMESTAMP},
      is_limit = #{isLimit,jdbcType=INTEGER},
      num = #{num,jdbcType=VARCHAR},
      region = #{region,jdbcType=VARCHAR},
      penalty = #{penalty,jdbcType=VARCHAR},
      remarks = #{remarks,jdbcType=VARCHAR},
      data_state = #{dataState,jdbcType=INTEGER},
      create_empid = #{createEmpid,jdbcType=BIGINT},
      create_name = #{createName,jdbcType=VARCHAR},
      create_date = #{createDate,jdbcType=TIMESTAMP},
      modify_empid = #{modifyEmpid,jdbcType=BIGINT},
      modify_name = #{modifyName,jdbcType=VARCHAR},
      modify_date = #{modifyDate,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>