TdBParkCardCustMapper.xml 11 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.TdBParkCardCustMapper" >
  <resultMap id="BaseResultMap" type="com.zteits.pay.domain.TdBParkCardCust" >
    <id column="id" property="id" jdbcType="BIGINT" />
    <result column="cust_id" property="custId" jdbcType="VARCHAR" />
    <result column="pl_no" property="plNo" jdbcType="VARCHAR" />
    <result column="card_no" property="cardNo" jdbcType="VARCHAR" />
    <result column="car_number" property="carNumber" jdbcType="VARCHAR" />
    <result column="push_state" property="pushState" jdbcType="INTEGER" />
    <result column="opt_type" property="optType" jdbcType="INTEGER" />
    <result column="price" property="price" jdbcType="BIGINT" />
    <result column="num" property="num" jdbcType="INTEGER" />
    <result column="discount_amount" property="discountAmount" jdbcType="BIGINT" />
    <result column="discount_no" property="discountNo" jdbcType="VARCHAR" />
    <result column="total_amount" property="totalAmount" jdbcType="BIGINT" />
    <result column="eff_date" property="effDate" jdbcType="TIMESTAMP" />
    <result column="exp_date" property="expDate" jdbcType="TIMESTAMP" />
    <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.TdBParkCardCust" extends="BaseResultMap" >
    <result column="remark" property="remark" jdbcType="LONGVARCHAR" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, cust_id, pl_no, card_no, car_number, push_state,opt_type, price, num, discount_amount, 
    discount_no, total_amount, eff_date, exp_date, 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_cust
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
    delete from td_b_park_card_cust
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.zteits.pay.domain.TdBParkCardCust">
    <selectKey resultType="java.lang.Long" keyProperty="id" order="AFTER" >
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into td_b_park_card_cust (cust_id, pl_no, card_no, 
      car_number, push_state, opt_type,price, 
      num, discount_amount, discount_no, 
      total_amount, eff_date, exp_date, 
      data_state, create_empid, create_date, 
      modify_empid, modify_date, remark
      )
    values (#{custId,jdbcType=VARCHAR}, #{plNo,jdbcType=VARCHAR}, #{cardNo,jdbcType=VARCHAR}, 
      #{carNumber,jdbcType=VARCHAR}, #{pushState,jdbcType=INTEGER}, #{optType,jdbcType=INTEGER}, #{price,jdbcType=BIGINT}, 
      #{num,jdbcType=INTEGER}, #{discountAmount,jdbcType=BIGINT}, #{discountNo,jdbcType=VARCHAR}, 
      #{totalAmount,jdbcType=BIGINT}, #{effDate,jdbcType=TIMESTAMP}, #{expDate,jdbcType=TIMESTAMP}, 
      #{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.TdBParkCardCust" >
    <selectKey resultType="java.lang.Long" keyProperty="id" order="AFTER" >
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into td_b_park_card_cust
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="custId != null" >
        cust_id,
      </if>
      <if test="plNo != null" >
        pl_no,
      </if>
      <if test="cardNo != null" >
        card_no,
      </if>
      <if test="carNumber != null" >
        car_number,
      </if>
      <if test="pushState != null" >
        push_state,
      </if>
      <if test="optType != null" >
        opt_type,
      </if>
      <if test="price != null" >
        price,
      </if>
      <if test="num != null" >
        num,
      </if>
      <if test="discountAmount != null" >
        discount_amount,
      </if>
      <if test="discountNo != null" >
        discount_no,
      </if>
      <if test="totalAmount != null" >
        total_amount,
      </if>
      <if test="effDate != null" >
        eff_date,
      </if>
      <if test="expDate != null" >
        exp_date,
      </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="custId != null" >
        #{custId,jdbcType=VARCHAR},
      </if>
      <if test="plNo != null" >
        #{plNo,jdbcType=VARCHAR},
      </if>
      <if test="cardNo != null" >
        #{cardNo,jdbcType=VARCHAR},
      </if>
      <if test="carNumber != null" >
        #{carNumber,jdbcType=VARCHAR},
      </if>
      <if test="pushState != null" >
        #{pushState,jdbcType=INTEGER},
      </if>
        <if test="optType != null" >
        #{optType,jdbcType=INTEGER},
      </if>
      <if test="price != null" >
        #{price,jdbcType=BIGINT},
      </if>
      <if test="num != null" >
        #{num,jdbcType=INTEGER},
      </if>
      <if test="discountAmount != null" >
        #{discountAmount,jdbcType=BIGINT},
      </if>
      <if test="discountNo != null" >
        #{discountNo,jdbcType=VARCHAR},
      </if>
      <if test="totalAmount != null" >
        #{totalAmount,jdbcType=BIGINT},
      </if>
      <if test="effDate != null" >
        #{effDate,jdbcType=TIMESTAMP},
      </if>
      <if test="expDate != null" >
        #{expDate,jdbcType=TIMESTAMP},
      </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.TdBParkCardCust" >
    update td_b_park_card_cust
    <set >
      <if test="custId != null" >
        cust_id = #{custId,jdbcType=VARCHAR},
      </if>
      <if test="plNo != null" >
        pl_no = #{plNo,jdbcType=VARCHAR},
      </if>
      <if test="cardNo != null" >
        card_no = #{cardNo,jdbcType=VARCHAR},
      </if>
      <if test="carNumber != null" >
        car_number = #{carNumber,jdbcType=VARCHAR},
      </if>
      <if test="pushState != null" >
        push_state = #{pushState,jdbcType=INTEGER},
      </if>
       <if test="optType != null" >
        opt_type = #{optType,jdbcType=INTEGER},
      </if>
      <if test="price != null" >
        price = #{price,jdbcType=BIGINT},
      </if>
      <if test="num != null" >
        num = #{num,jdbcType=INTEGER},
      </if>
      <if test="discountAmount != null" >
        discount_amount = #{discountAmount,jdbcType=BIGINT},
      </if>
      <if test="discountNo != null" >
        discount_no = #{discountNo,jdbcType=VARCHAR},
      </if>
      <if test="totalAmount != null" >
        total_amount = #{totalAmount,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="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.TdBParkCardCust" >
    update td_b_park_card_cust
    set cust_id = #{custId,jdbcType=VARCHAR},
      pl_no = #{plNo,jdbcType=VARCHAR},
      card_no = #{cardNo,jdbcType=VARCHAR},
      car_number = #{carNumber,jdbcType=VARCHAR},
      push_state = #{pushState,jdbcType=INTEGER},
      opt_type= #{optType,jdbcType=INTEGER},
      price = #{price,jdbcType=BIGINT},
      num = #{num,jdbcType=INTEGER},
      discount_amount = #{discountAmount,jdbcType=BIGINT},
      discount_no = #{discountNo,jdbcType=VARCHAR},
      total_amount = #{totalAmount,jdbcType=BIGINT},
      eff_date = #{effDate,jdbcType=TIMESTAMP},
      exp_date = #{expDate,jdbcType=TIMESTAMP},
      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.TdBParkCardCust" >
    update td_b_park_card_cust
    set cust_id = #{custId,jdbcType=VARCHAR},
      pl_no = #{plNo,jdbcType=VARCHAR},
      card_no = #{cardNo,jdbcType=VARCHAR},
      car_number = #{carNumber,jdbcType=VARCHAR},
      push_state = #{pushState,jdbcType=INTEGER},
      opt_type = #{optType,jdbcType=INTEGER},
      price = #{price,jdbcType=BIGINT},
      num = #{num,jdbcType=INTEGER},
      discount_amount = #{discountAmount,jdbcType=BIGINT},
      discount_no = #{discountNo,jdbcType=VARCHAR},
      total_amount = #{totalAmount,jdbcType=BIGINT},
      eff_date = #{effDate,jdbcType=TIMESTAMP},
      exp_date = #{expDate,jdbcType=TIMESTAMP},
      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>