TdBParkCardMapper.xml 9.61 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.pay.mapper.TdBParkCardMapper" >
  <resultMap id="BaseResultMap" type="com.zteits.pay.domain.TdBParkCard" >
    <id column="id" property="id" jdbcType="BIGINT" />
    <result column="card_no" property="cardNo" jdbcType="VARCHAR" />
    <result column="card_name" property="cardName" jdbcType="VARCHAR" />
    <result column="car_type" property="carType" jdbcType="INTEGER" />
    <result column="card_type" property="cardType" jdbcType="INTEGER" />
    <result column="valid_unit" property="validUnit" jdbcType="INTEGER" />
    <result column="valid_num" property="validNum" jdbcType="INTEGER" />
    <result column="price" property="price" jdbcType="BIGINT" />
    <result column="eff_date" property="effDate" jdbcType="TIMESTAMP" />
    <result column="exp_date" property="expDate" jdbcType="TIMESTAMP" />
    <result column="card_status" property="cardStatus" jdbcType="INTEGER" />
    <result column="data_state" property="dataState" jdbcType="INTEGER" />
    <result column="create_empid" property="createEmpid" jdbcType="BIGINT" />
    <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
    <result column="modify_empid" property="modifyEmpid" jdbcType="BIGINT" />
    <result column="modify_date" property="modifyDate" jdbcType="TIMESTAMP" />
  </resultMap>
  <resultMap id="ResultMapWithBLOBs" type="com.zteits.pay.domain.TdBParkCard" extends="BaseResultMap" >
    <result column="remark" property="remark" jdbcType="LONGVARCHAR" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, card_no, card_name, car_type, card_type, valid_unit, valid_num, price, eff_date, 
    exp_date, card_status, data_state, create_empid, create_date, modify_empid, modify_date
  </sql>
  <sql id="Blob_Column_List" >
    remark
  </sql>
  <select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Long" >
    select 
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from td_b_park_card
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
    delete from td_b_park_card
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.zteits.pay.domain.TdBParkCard" >
    <selectKey resultType="java.lang.Long" keyProperty="id" order="AFTER" >
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into td_b_park_card (card_no, card_name, car_type, 
      card_type, valid_unit, valid_num, 
      price, eff_date, exp_date, 
      card_status, data_state, create_empid, 
      create_date, modify_empid, modify_date, 
      remark)
    values (#{cardNo,jdbcType=VARCHAR}, #{cardName,jdbcType=VARCHAR}, #{carType,jdbcType=INTEGER}, 
      #{cardType,jdbcType=INTEGER}, #{validUnit,jdbcType=INTEGER}, #{validNum,jdbcType=INTEGER}, 
      #{price,jdbcType=BIGINT}, #{effDate,jdbcType=TIMESTAMP}, #{expDate,jdbcType=TIMESTAMP}, 
      #{cardStatus,jdbcType=INTEGER}, #{dataState,jdbcType=INTEGER}, #{createEmpid,jdbcType=BIGINT}, 
      #{createDate,jdbcType=TIMESTAMP}, #{modifyEmpid,jdbcType=BIGINT}, #{modifyDate,jdbcType=TIMESTAMP}, 
      #{remark,jdbcType=LONGVARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.pay.domain.TdBParkCard" >
    <selectKey resultType="java.lang.Long" keyProperty="id" order="AFTER" >
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into td_b_park_card
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="cardNo != null" >
        card_no,
      </if>
      <if test="cardName != null" >
        card_name,
      </if>
      <if test="carType != null" >
        car_type,
      </if>
      <if test="cardType != null" >
        card_type,
      </if>
      <if test="validUnit != null" >
        valid_unit,
      </if>
      <if test="validNum != null" >
        valid_num,
      </if>
      <if test="price != null" >
        price,
      </if>
      <if test="effDate != null" >
        eff_date,
      </if>
      <if test="expDate != null" >
        exp_date,
      </if>
      <if test="cardStatus != null" >
        card_status,
      </if>
      <if test="dataState != null" >
        data_state,
      </if>
      <if test="createEmpid != null" >
        create_empid,
      </if>
      <if test="createDate != null" >
        create_date,
      </if>
      <if test="modifyEmpid != null" >
        modify_empid,
      </if>
      <if test="modifyDate != null" >
        modify_date,
      </if>
      <if test="remark != null" >
        remark,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="cardNo != null" >
        #{cardNo,jdbcType=VARCHAR},
      </if>
      <if test="cardName != null" >
        #{cardName,jdbcType=VARCHAR},
      </if>
      <if test="carType != null" >
        #{carType,jdbcType=INTEGER},
      </if>
      <if test="cardType != null" >
        #{cardType,jdbcType=INTEGER},
      </if>
      <if test="validUnit != null" >
        #{validUnit,jdbcType=INTEGER},
      </if>
      <if test="validNum != null" >
        #{validNum,jdbcType=INTEGER},
      </if>
      <if test="price != null" >
        #{price,jdbcType=BIGINT},
      </if>
      <if test="effDate != null" >
        #{effDate,jdbcType=TIMESTAMP},
      </if>
      <if test="expDate != null" >
        #{expDate,jdbcType=TIMESTAMP},
      </if>
      <if test="cardStatus != null" >
        #{cardStatus,jdbcType=INTEGER},
      </if>
      <if test="dataState != null" >
        #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createEmpid != null" >
        #{createEmpid,jdbcType=BIGINT},
      </if>
      <if test="createDate != null" >
        #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyEmpid != null" >
        #{modifyEmpid,jdbcType=BIGINT},
      </if>
      <if test="modifyDate != null" >
        #{modifyDate,jdbcType=TIMESTAMP},
      </if>
      <if test="remark != null" >
        #{remark,jdbcType=LONGVARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.pay.domain.TdBParkCard" >
    update td_b_park_card
    <set >
      <if test="cardNo != null" >
        card_no = #{cardNo,jdbcType=VARCHAR},
      </if>
      <if test="cardName != null" >
        card_name = #{cardName,jdbcType=VARCHAR},
      </if>
      <if test="carType != null" >
        car_type = #{carType,jdbcType=INTEGER},
      </if>
      <if test="cardType != null" >
        card_type = #{cardType,jdbcType=INTEGER},
      </if>
      <if test="validUnit != null" >
        valid_unit = #{validUnit,jdbcType=INTEGER},
      </if>
      <if test="validNum != null" >
        valid_num = #{validNum,jdbcType=INTEGER},
      </if>
      <if test="price != null" >
        price = #{price,jdbcType=BIGINT},
      </if>
      <if test="effDate != null" >
        eff_date = #{effDate,jdbcType=TIMESTAMP},
      </if>
      <if test="expDate != null" >
        exp_date = #{expDate,jdbcType=TIMESTAMP},
      </if>
      <if test="cardStatus != null" >
        card_status = #{cardStatus,jdbcType=INTEGER},
      </if>
      <if test="dataState != null" >
        data_state = #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createEmpid != null" >
        create_empid = #{createEmpid,jdbcType=BIGINT},
      </if>
      <if test="createDate != null" >
        create_date = #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyEmpid != null" >
        modify_empid = #{modifyEmpid,jdbcType=BIGINT},
      </if>
      <if test="modifyDate != null" >
        modify_date = #{modifyDate,jdbcType=TIMESTAMP},
      </if>
      <if test="remark != null" >
        remark = #{remark,jdbcType=LONGVARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.zteits.pay.domain.TdBParkCard" >
    update td_b_park_card
    set card_no = #{cardNo,jdbcType=VARCHAR},
      card_name = #{cardName,jdbcType=VARCHAR},
      car_type = #{carType,jdbcType=INTEGER},
      card_type = #{cardType,jdbcType=INTEGER},
      valid_unit = #{validUnit,jdbcType=INTEGER},
      valid_num = #{validNum,jdbcType=INTEGER},
      price = #{price,jdbcType=BIGINT},
      eff_date = #{effDate,jdbcType=TIMESTAMP},
      exp_date = #{expDate,jdbcType=TIMESTAMP},
      card_status = #{cardStatus,jdbcType=INTEGER},
      data_state = #{dataState,jdbcType=INTEGER},
      create_empid = #{createEmpid,jdbcType=BIGINT},
      create_date = #{createDate,jdbcType=TIMESTAMP},
      modify_empid = #{modifyEmpid,jdbcType=BIGINT},
      modify_date = #{modifyDate,jdbcType=TIMESTAMP},
      remark = #{remark,jdbcType=LONGVARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.pay.domain.TdBParkCard" >
    update td_b_park_card
    set card_no = #{cardNo,jdbcType=VARCHAR},
      card_name = #{cardName,jdbcType=VARCHAR},
      car_type = #{carType,jdbcType=INTEGER},
      card_type = #{cardType,jdbcType=INTEGER},
      valid_unit = #{validUnit,jdbcType=INTEGER},
      valid_num = #{validNum,jdbcType=INTEGER},
      price = #{price,jdbcType=BIGINT},
      eff_date = #{effDate,jdbcType=TIMESTAMP},
      exp_date = #{expDate,jdbcType=TIMESTAMP},
      card_status = #{cardStatus,jdbcType=INTEGER},
      data_state = #{dataState,jdbcType=INTEGER},
      create_empid = #{createEmpid,jdbcType=BIGINT},
      create_date = #{createDate,jdbcType=TIMESTAMP},
      modify_empid = #{modifyEmpid,jdbcType=BIGINT},
      modify_date = #{modifyDate,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>