TdBVipCardContractMapper.xml 11.9 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.order.mapper.TdBVipCardContractMapper">
  <resultMap id="BaseResultMap" type="com.zteits.order.domain.TdBVipCardContract">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="contract_no" jdbcType="VARCHAR" property="contractNo" />
    <result column="detail_id" jdbcType="BIGINT" property="detailId" />
    <result column="order_id" jdbcType="VARCHAR" property="orderId" />
    <result column="pl_no" jdbcType="VARCHAR" property="plNo" />
    <result column="pl_name" jdbcType="VARCHAR" property="plName" />
    <result column="car_number" jdbcType="VARCHAR" property="carNumber" />
    <result column="cust_name" jdbcType="VARCHAR" property="custName" />
    <result column="cust_phone" jdbcType="VARCHAR" property="custPhone" />
    <result column="cust_address" jdbcType="VARCHAR" property="custAddress" />
    <result column="price" jdbcType="BIGINT" property="price" />
    <result column="total_fee" jdbcType="BIGINT" property="totalFee" />
    <result column="eff_date" jdbcType="TIMESTAMP" property="effDate" />
    <result column="exp_date" jdbcType="TIMESTAMP" property="expDate" />
    <result column="detail_create_date" jdbcType="TIMESTAMP" property="detailCreateDate" />
    <result column="contract_year" jdbcType="INTEGER" property="contractYear" />
    <result column="file_name" jdbcType="VARCHAR" property="fileName" />
    <result column="file_key" jdbcType="VARCHAR" property="fileKey" />
    <result column="file_url" jdbcType="VARCHAR" property="fileUrl" />
    <result column="file_size" jdbcType="BIGINT" property="fileSize" />
    <result column="data_state" jdbcType="INTEGER" property="dataState" />
    <result column="create_op" jdbcType="INTEGER" property="createOp" />
    <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
    <result column="modify_op" jdbcType="INTEGER" property="modifyOp" />
    <result column="modify_date" jdbcType="TIMESTAMP" property="modifyDate" />
  </resultMap>
  <sql id="Base_Column_List">
    id, contract_no, detail_id, order_id, pl_no, pl_name, car_number, cust_name, cust_phone,
    cust_address, price, total_fee, eff_date, exp_date, detail_create_date, contract_year,
    file_name, file_key, file_url, file_size, data_state, create_op, create_date, modify_op,
    modify_date
  </sql>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from td_b_vip_card_contract
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.zteits.order.domain.TdBVipCardContract">
    insert into td_b_vip_card_contract (id, contract_no, detail_id,
      order_id, pl_no, pl_name,
      car_number, cust_name, cust_phone,
      cust_address, price, total_fee,
      eff_date, exp_date, detail_create_date,
      contract_year, file_name, file_key,
      file_url, file_size, data_state,
      create_op, create_date, modify_op,
      modify_date)
    values (#{id,jdbcType=BIGINT}, #{contractNo,jdbcType=VARCHAR}, #{detailId,jdbcType=BIGINT},
      #{orderId,jdbcType=VARCHAR}, #{plNo,jdbcType=VARCHAR}, #{plName,jdbcType=VARCHAR},
      #{carNumber,jdbcType=VARCHAR}, #{custName,jdbcType=VARCHAR}, #{custPhone,jdbcType=VARCHAR},
      #{custAddress,jdbcType=VARCHAR}, #{price,jdbcType=BIGINT}, #{totalFee,jdbcType=BIGINT},
      #{effDate,jdbcType=TIMESTAMP}, #{expDate,jdbcType=TIMESTAMP}, #{detailCreateDate,jdbcType=TIMESTAMP},
      #{contractYear,jdbcType=INTEGER}, #{fileName,jdbcType=VARCHAR}, #{fileKey,jdbcType=VARCHAR},
      #{fileUrl,jdbcType=VARCHAR}, #{fileSize,jdbcType=BIGINT}, #{dataState,jdbcType=INTEGER},
      #{createOp,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}, #{modifyOp,jdbcType=INTEGER},
      #{modifyDate,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.order.domain.TdBVipCardContract">
    insert into td_b_vip_card_contract
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="contractNo != null">
        contract_no,
      </if>
      <if test="detailId != null">
        detail_id,
      </if>
      <if test="orderId != null">
        order_id,
      </if>
      <if test="plNo != null">
        pl_no,
      </if>
      <if test="plName != null">
        pl_name,
      </if>
      <if test="carNumber != null">
        car_number,
      </if>
      <if test="custName != null">
        cust_name,
      </if>
      <if test="custPhone != null">
        cust_phone,
      </if>
      <if test="custAddress != null">
        cust_address,
      </if>
      <if test="price != null">
        price,
      </if>
      <if test="totalFee != null">
        total_fee,
      </if>
      <if test="effDate != null">
        eff_date,
      </if>
      <if test="expDate != null">
        exp_date,
      </if>
      <if test="detailCreateDate != null">
        detail_create_date,
      </if>
      <if test="contractYear != null">
        contract_year,
      </if>
      <if test="fileName != null">
        file_name,
      </if>
      <if test="fileKey != null">
        file_key,
      </if>
      <if test="fileUrl != null">
        file_url,
      </if>
      <if test="fileSize != null">
        file_size,
      </if>
      <if test="dataState != null">
        data_state,
      </if>
      <if test="createOp != null">
        create_op,
      </if>
      <if test="createDate != null">
        create_date,
      </if>
      <if test="modifyOp != null">
        modify_op,
      </if>
      <if test="modifyDate != null">
        modify_date,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=BIGINT},
      </if>
      <if test="contractNo != null">
        #{contractNo,jdbcType=VARCHAR},
      </if>
      <if test="detailId != null">
        #{detailId,jdbcType=BIGINT},
      </if>
      <if test="orderId != null">
        #{orderId,jdbcType=VARCHAR},
      </if>
      <if test="plNo != null">
        #{plNo,jdbcType=VARCHAR},
      </if>
      <if test="plName != null">
        #{plName,jdbcType=VARCHAR},
      </if>
      <if test="carNumber != null">
        #{carNumber,jdbcType=VARCHAR},
      </if>
      <if test="custName != null">
        #{custName,jdbcType=VARCHAR},
      </if>
      <if test="custPhone != null">
        #{custPhone,jdbcType=VARCHAR},
      </if>
      <if test="custAddress != null">
        #{custAddress,jdbcType=VARCHAR},
      </if>
      <if test="price != null">
        #{price,jdbcType=BIGINT},
      </if>
      <if test="totalFee != null">
        #{totalFee,jdbcType=BIGINT},
      </if>
      <if test="effDate != null">
        #{effDate,jdbcType=TIMESTAMP},
      </if>
      <if test="expDate != null">
        #{expDate,jdbcType=TIMESTAMP},
      </if>
      <if test="detailCreateDate != null">
        #{detailCreateDate,jdbcType=TIMESTAMP},
      </if>
      <if test="contractYear != null">
        #{contractYear,jdbcType=INTEGER},
      </if>
      <if test="fileName != null">
        #{fileName,jdbcType=VARCHAR},
      </if>
      <if test="fileKey != null">
        #{fileKey,jdbcType=VARCHAR},
      </if>
      <if test="fileUrl != null">
        #{fileUrl,jdbcType=VARCHAR},
      </if>
      <if test="fileSize != null">
        #{fileSize,jdbcType=BIGINT},
      </if>
      <if test="dataState != null">
        #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createOp != null">
        #{createOp,jdbcType=INTEGER},
      </if>
      <if test="createDate != null">
        #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyOp != null">
        #{modifyOp,jdbcType=INTEGER},
      </if>
      <if test="modifyDate != null">
        #{modifyDate,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from td_b_vip_card_contract
    where id = #{id,jdbcType=BIGINT}
  </select>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.order.domain.TdBVipCardContract">
    update td_b_vip_card_contract
    <set>
      <if test="contractNo != null">
        contract_no = #{contractNo,jdbcType=VARCHAR},
      </if>
      <if test="detailId != null">
        detail_id = #{detailId,jdbcType=BIGINT},
      </if>
      <if test="orderId != null">
        order_id = #{orderId,jdbcType=VARCHAR},
      </if>
      <if test="plNo != null">
        pl_no = #{plNo,jdbcType=VARCHAR},
      </if>
      <if test="plName != null">
        pl_name = #{plName,jdbcType=VARCHAR},
      </if>
      <if test="carNumber != null">
        car_number = #{carNumber,jdbcType=VARCHAR},
      </if>
      <if test="custName != null">
        cust_name = #{custName,jdbcType=VARCHAR},
      </if>
      <if test="custPhone != null">
        cust_phone = #{custPhone,jdbcType=VARCHAR},
      </if>
      <if test="custAddress != null">
        cust_address = #{custAddress,jdbcType=VARCHAR},
      </if>
      <if test="price != null">
        price = #{price,jdbcType=BIGINT},
      </if>
      <if test="totalFee != null">
        total_fee = #{totalFee,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="detailCreateDate != null">
        detail_create_date = #{detailCreateDate,jdbcType=TIMESTAMP},
      </if>
      <if test="contractYear != null">
        contract_year = #{contractYear,jdbcType=INTEGER},
      </if>
      <if test="fileName != null">
        file_name = #{fileName,jdbcType=VARCHAR},
      </if>
      <if test="fileKey != null">
        file_key = #{fileKey,jdbcType=VARCHAR},
      </if>
      <if test="fileUrl != null">
        file_url = #{fileUrl,jdbcType=VARCHAR},
      </if>
      <if test="fileSize != null">
        file_size = #{fileSize,jdbcType=BIGINT},
      </if>
      <if test="dataState != null">
        data_state = #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createOp != null">
        create_op = #{createOp,jdbcType=INTEGER},
      </if>
      <if test="createDate != null">
        create_date = #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyOp != null">
        modify_op = #{modifyOp,jdbcType=INTEGER},
      </if>
      <if test="modifyDate != null">
        modify_date = #{modifyDate,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.order.domain.TdBVipCardContract">
    update td_b_vip_card_contract
    set contract_no = #{contractNo,jdbcType=VARCHAR},
      detail_id = #{detailId,jdbcType=BIGINT},
      order_id = #{orderId,jdbcType=VARCHAR},
      pl_no = #{plNo,jdbcType=VARCHAR},
      pl_name = #{plName,jdbcType=VARCHAR},
      car_number = #{carNumber,jdbcType=VARCHAR},
      cust_name = #{custName,jdbcType=VARCHAR},
      cust_phone = #{custPhone,jdbcType=VARCHAR},
      cust_address = #{custAddress,jdbcType=VARCHAR},
      price = #{price,jdbcType=BIGINT},
      total_fee = #{totalFee,jdbcType=BIGINT},
      eff_date = #{effDate,jdbcType=TIMESTAMP},
      exp_date = #{expDate,jdbcType=TIMESTAMP},
      detail_create_date = #{detailCreateDate,jdbcType=TIMESTAMP},
      contract_year = #{contractYear,jdbcType=INTEGER},
      file_name = #{fileName,jdbcType=VARCHAR},
      file_key = #{fileKey,jdbcType=VARCHAR},
      file_url = #{fileUrl,jdbcType=VARCHAR},
      file_size = #{fileSize,jdbcType=BIGINT},
      data_state = #{dataState,jdbcType=INTEGER},
      create_op = #{createOp,jdbcType=INTEGER},
      create_date = #{createDate,jdbcType=TIMESTAMP},
      modify_op = #{modifyOp,jdbcType=INTEGER},
      modify_date = #{modifyDate,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>