TdACardCouponsMapper.xml 10.5 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.TdACardCouponsMapper" >
  <resultMap id="BaseResultMap" type="com.zteits.pay.domain.TdACardCoupons" >
    <id column="id" property="id" jdbcType="BIGINT" />
    <result column="park_card_id" property="parkCardId" jdbcType="VARCHAR" />
    <result column="cust_id" property="custId" jdbcType="VARCHAR" />
    <result column="acct_id" property="acctId" jdbcType="VARCHAR" />
    <result column="card_big_type" property="cardBigType" jdbcType="INTEGER" />
    <result column="card_type" property="cardType" jdbcType="INTEGER" />
    <result column="card_balance" property="cardBalance" jdbcType="DECIMAL" />
    <result column="card_price" property="cardPrice" jdbcType="DECIMAL" />
    <result column="card_num" property="cardNum" jdbcType="INTEGER" />
    <result column="card_total_amount" property="cardTotalAmount" jdbcType="DECIMAL" />
    <result column="eff_date" property="effDate" jdbcType="TIMESTAMP" />
    <result column="exp_date" property="expDate" jdbcType="TIMESTAMP" />
    <result column="card_scope" property="cardScope" jdbcType="VARCHAR" />
    <result column="car_number" property="carNumber" jdbcType="VARCHAR" />
    <result column="remark" property="remark" jdbcType="VARCHAR" />
    <result column="push_state" property="pushState" jdbcType="INTEGER" />
    <result column="data_state" property="dataState" jdbcType="INTEGER" />
    <result column="create_empid" property="createEmpid" jdbcType="VARCHAR" />
    <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
    <result column="modfiy_empid" property="modfiyEmpid" jdbcType="VARCHAR" />
    <result column="modfiy_date" property="modfiyDate" jdbcType="TIMESTAMP" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, park_card_id, cust_id, acct_id, card_big_type, card_type, card_balance, card_price, 
    card_num, card_total_amount, eff_date, exp_date, card_scope, car_number, remark, 
    push_state, data_state, create_empid, create_date, modfiy_empid, modfiy_date
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
    select 
    <include refid="Base_Column_List" />
    from td_a_card_coupons
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
    delete from td_a_card_coupons
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.zteits.pay.domain.TdACardCoupons" >
    <selectKey resultType="java.lang.Long" keyProperty="id" order="AFTER" >
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into td_a_card_coupons (park_card_id, cust_id, acct_id, 
      card_big_type, card_type, card_balance, 
      card_price, card_num, card_total_amount, 
      eff_date, exp_date, card_scope, 
      car_number, remark, push_state, 
      data_state, create_empid, create_date, 
      modfiy_empid, modfiy_date)
    values (#{parkCardId,jdbcType=BIGINT}, #{custId,jdbcType=VARCHAR}, #{acctId,jdbcType=VARCHAR}, 
      #{cardBigType,jdbcType=INTEGER}, #{cardType,jdbcType=INTEGER}, #{cardBalance,jdbcType=DECIMAL}, 
      #{cardPrice,jdbcType=DECIMAL}, #{cardNum,jdbcType=INTEGER}, #{cardTotalAmount,jdbcType=DECIMAL}, 
      #{effDate,jdbcType=TIMESTAMP}, #{expDate,jdbcType=TIMESTAMP}, #{cardScope,jdbcType=VARCHAR}, 
      #{carNumber,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{pushState,jdbcType=INTEGER}, 
      #{dataState,jdbcType=INTEGER}, #{createEmpid,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, 
      #{modfiyEmpid,jdbcType=VARCHAR}, #{modfiyDate,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.pay.domain.TdACardCoupons" >
    <selectKey resultType="java.lang.Long" keyProperty="id" order="AFTER" >
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into td_a_card_coupons
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="parkCardId != null" >
        park_card_id,
      </if>
      <if test="custId != null" >
        cust_id,
      </if>
      <if test="acctId != null" >
        acct_id,
      </if>
      <if test="cardBigType != null" >
        card_big_type,
      </if>
      <if test="cardType != null" >
        card_type,
      </if>
      <if test="cardBalance != null" >
        card_balance,
      </if>
      <if test="cardPrice != null" >
        card_price,
      </if>
      <if test="cardNum != null" >
        card_num,
      </if>
      <if test="cardTotalAmount != null" >
        card_total_amount,
      </if>
      <if test="effDate != null" >
        eff_date,
      </if>
      <if test="expDate != null" >
        exp_date,
      </if>
      <if test="cardScope != null" >
        card_scope,
      </if>
      <if test="carNumber != null" >
        car_number,
      </if>
      <if test="remark != null" >
        remark,
      </if>
      <if test="pushState != null" >
        push_state,
      </if>
      <if test="dataState != null" >
        data_state,
      </if>
      <if test="createEmpid != null" >
        create_empid,
      </if>
      <if test="createDate != null" >
        create_date,
      </if>
      <if test="modfiyEmpid != null" >
        modfiy_empid,
      </if>
      <if test="modfiyDate != null" >
        modfiy_date,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="parkCardId != null" >
        #{parkCardId,jdbcType=BIGINT},
      </if>
      <if test="custId != null" >
        #{custId,jdbcType=VARCHAR},
      </if>
      <if test="acctId != null" >
        #{acctId,jdbcType=VARCHAR},
      </if>
      <if test="cardBigType != null" >
        #{cardBigType,jdbcType=INTEGER},
      </if>
      <if test="cardType != null" >
        #{cardType,jdbcType=INTEGER},
      </if>
      <if test="cardBalance != null" >
        #{cardBalance,jdbcType=DECIMAL},
      </if>
      <if test="cardPrice != null" >
        #{cardPrice,jdbcType=DECIMAL},
      </if>
      <if test="cardNum != null" >
        #{cardNum,jdbcType=INTEGER},
      </if>
      <if test="cardTotalAmount != null" >
        #{cardTotalAmount,jdbcType=DECIMAL},
      </if>
      <if test="effDate != null" >
        #{effDate,jdbcType=TIMESTAMP},
      </if>
      <if test="expDate != null" >
        #{expDate,jdbcType=TIMESTAMP},
      </if>
      <if test="cardScope != null" >
        #{cardScope,jdbcType=VARCHAR},
      </if>
      <if test="carNumber != null" >
        #{carNumber,jdbcType=VARCHAR},
      </if>
      <if test="remark != null" >
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="pushState != null" >
        #{pushState,jdbcType=INTEGER},
      </if>
      <if test="dataState != null" >
        #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createEmpid != null" >
        #{createEmpid,jdbcType=VARCHAR},
      </if>
      <if test="createDate != null" >
        #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="modfiyEmpid != null" >
        #{modfiyEmpid,jdbcType=VARCHAR},
      </if>
      <if test="modfiyDate != null" >
        #{modfiyDate,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.pay.domain.TdACardCoupons" >
    update td_a_card_coupons
    <set >
      <if test="parkCardId != null" >
        park_card_id = #{parkCardId,jdbcType=BIGINT},
      </if>
      <if test="custId != null" >
        cust_id = #{custId,jdbcType=VARCHAR},
      </if>
      <if test="acctId != null" >
        acct_id = #{acctId,jdbcType=VARCHAR},
      </if>
      <if test="cardBigType != null" >
        card_big_type = #{cardBigType,jdbcType=INTEGER},
      </if>
      <if test="cardType != null" >
        card_type = #{cardType,jdbcType=INTEGER},
      </if>
      <if test="cardBalance != null" >
        card_balance = #{cardBalance,jdbcType=DECIMAL},
      </if>
      <if test="cardPrice != null" >
        card_price = #{cardPrice,jdbcType=DECIMAL},
      </if>
      <if test="cardNum != null" >
        card_num = #{cardNum,jdbcType=INTEGER},
      </if>
      <if test="cardTotalAmount != null" >
        card_total_amount = #{cardTotalAmount,jdbcType=DECIMAL},
      </if>
      <if test="effDate != null" >
        eff_date = #{effDate,jdbcType=TIMESTAMP},
      </if>
      <if test="expDate != null" >
        exp_date = #{expDate,jdbcType=TIMESTAMP},
      </if>
      <if test="cardScope != null" >
        card_scope = #{cardScope,jdbcType=VARCHAR},
      </if>
      <if test="carNumber != null" >
        car_number = #{carNumber,jdbcType=VARCHAR},
      </if>
      <if test="remark != null" >
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="pushState != null" >
        push_state = #{pushState,jdbcType=INTEGER},
      </if>
      <if test="dataState != null" >
        data_state = #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createEmpid != null" >
        create_empid = #{createEmpid,jdbcType=VARCHAR},
      </if>
      <if test="createDate != null" >
        create_date = #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="modfiyEmpid != null" >
        modfiy_empid = #{modfiyEmpid,jdbcType=VARCHAR},
      </if>
      <if test="modfiyDate != null" >
        modfiy_date = #{modfiyDate,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.pay.domain.TdACardCoupons" >
    update td_a_card_coupons
    set park_card_id = #{parkCardId,jdbcType=BIGINT},
      cust_id = #{custId,jdbcType=VARCHAR},
      acct_id = #{acctId,jdbcType=VARCHAR},
      card_big_type = #{cardBigType,jdbcType=INTEGER},
      card_type = #{cardType,jdbcType=INTEGER},
      card_balance = #{cardBalance,jdbcType=DECIMAL},
      card_price = #{cardPrice,jdbcType=DECIMAL},
      card_num = #{cardNum,jdbcType=INTEGER},
      card_total_amount = #{cardTotalAmount,jdbcType=DECIMAL},
      eff_date = #{effDate,jdbcType=TIMESTAMP},
      exp_date = #{expDate,jdbcType=TIMESTAMP},
      card_scope = #{cardScope,jdbcType=VARCHAR},
      car_number = #{carNumber,jdbcType=VARCHAR},
      remark = #{remark,jdbcType=VARCHAR},
      push_state = #{pushState,jdbcType=INTEGER},
      data_state = #{dataState,jdbcType=INTEGER},
      create_empid = #{createEmpid,jdbcType=VARCHAR},
      create_date = #{createDate,jdbcType=TIMESTAMP},
      modfiy_empid = #{modfiyEmpid,jdbcType=VARCHAR},
      modfiy_date = #{modfiyDate,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>