TActivityDiscountLogMapper.xml 8.37 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.TActivityDiscountLogMapper">
  <resultMap id="BaseResultMap" type="com.zteits.bill.domain.TActivityDiscountLog">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="disc_no" jdbcType="VARCHAR" property="discNo" />
    <result column="disc_rule_no" jdbcType="VARCHAR" property="discRuleNo" />
    <result column="pay_order_id" jdbcType="VARCHAR" property="payOrderId" />
    <result column="disc_value" jdbcType="VARCHAR" property="discValue" />
    <result column="order_pay_fee" jdbcType="INTEGER" property="orderPayFee" />
    <result column="disc_fee" jdbcType="INTEGER" property="discFee" />
    <result column="disc_time" jdbcType="TIMESTAMP" property="discTime" />
    <result column="remarks" jdbcType="VARCHAR" property="remarks" />
    <result column="data_state" jdbcType="INTEGER" property="dataState" />
    <result column="create_empid" jdbcType="VARCHAR" property="createEmpid" />
    <result column="create_name" jdbcType="VARCHAR" property="createName" />
    <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
    <result column="modify_empid" jdbcType="VARCHAR" 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, disc_no, disc_rule_no, pay_order_id, disc_value, order_pay_fee, disc_fee, disc_time, 
    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 t_activity_discount_log
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from t_activity_discount_log
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.zteits.bill.domain.TActivityDiscountLog">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into t_activity_discount_log (disc_no, disc_rule_no, pay_order_id, 
      disc_value, order_pay_fee, disc_fee, 
      disc_time, remarks, data_state, 
      create_empid, create_name, create_date, 
      modify_empid, modify_name, modify_date
      )
    values (#{discNo,jdbcType=VARCHAR}, #{discRuleNo,jdbcType=VARCHAR}, #{payOrderId,jdbcType=VARCHAR}, 
      #{discValue,jdbcType=VARCHAR}, #{orderPayFee,jdbcType=INTEGER}, #{discFee,jdbcType=INTEGER}, 
      #{discTime,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, #{dataState,jdbcType=INTEGER}, 
      #{createEmpid,jdbcType=VARCHAR}, #{createName,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, 
      #{modifyEmpid,jdbcType=VARCHAR}, #{modifyName,jdbcType=VARCHAR}, #{modifyDate,jdbcType=TIMESTAMP}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.bill.domain.TActivityDiscountLog">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into t_activity_discount_log
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="discNo != null">
        disc_no,
      </if>
      <if test="discRuleNo != null">
        disc_rule_no,
      </if>
      <if test="payOrderId != null">
        pay_order_id,
      </if>
      <if test="discValue != null">
        disc_value,
      </if>
      <if test="orderPayFee != null">
        order_pay_fee,
      </if>
      <if test="discFee != null">
        disc_fee,
      </if>
      <if test="discTime != null">
        disc_time,
      </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="discNo != null">
        #{discNo,jdbcType=VARCHAR},
      </if>
      <if test="discRuleNo != null">
        #{discRuleNo,jdbcType=VARCHAR},
      </if>
      <if test="payOrderId != null">
        #{payOrderId,jdbcType=VARCHAR},
      </if>
      <if test="discValue != null">
        #{discValue,jdbcType=VARCHAR},
      </if>
      <if test="orderPayFee != null">
        #{orderPayFee,jdbcType=INTEGER},
      </if>
      <if test="discFee != null">
        #{discFee,jdbcType=INTEGER},
      </if>
      <if test="discTime != null">
        #{discTime,jdbcType=TIMESTAMP},
      </if>
      <if test="remarks != null">
        #{remarks,jdbcType=VARCHAR},
      </if>
      <if test="dataState != null">
        #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createEmpid != null">
        #{createEmpid,jdbcType=VARCHAR},
      </if>
      <if test="createName != null">
        #{createName,jdbcType=VARCHAR},
      </if>
      <if test="createDate != null">
        #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyEmpid != null">
        #{modifyEmpid,jdbcType=VARCHAR},
      </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.TActivityDiscountLog">
    update t_activity_discount_log
    <set>
      <if test="discNo != null">
        disc_no = #{discNo,jdbcType=VARCHAR},
      </if>
      <if test="discRuleNo != null">
        disc_rule_no = #{discRuleNo,jdbcType=VARCHAR},
      </if>
      <if test="payOrderId != null">
        pay_order_id = #{payOrderId,jdbcType=VARCHAR},
      </if>
      <if test="discValue != null">
        disc_value = #{discValue,jdbcType=VARCHAR},
      </if>
      <if test="orderPayFee != null">
        order_pay_fee = #{orderPayFee,jdbcType=INTEGER},
      </if>
      <if test="discFee != null">
        disc_fee = #{discFee,jdbcType=INTEGER},
      </if>
      <if test="discTime != null">
        disc_time = #{discTime,jdbcType=TIMESTAMP},
      </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=VARCHAR},
      </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=VARCHAR},
      </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.TActivityDiscountLog">
    update t_activity_discount_log
    set disc_no = #{discNo,jdbcType=VARCHAR},
      disc_rule_no = #{discRuleNo,jdbcType=VARCHAR},
      pay_order_id = #{payOrderId,jdbcType=VARCHAR},
      disc_value = #{discValue,jdbcType=VARCHAR},
      order_pay_fee = #{orderPayFee,jdbcType=INTEGER},
      disc_fee = #{discFee,jdbcType=INTEGER},
      disc_time = #{discTime,jdbcType=TIMESTAMP},
      remarks = #{remarks,jdbcType=VARCHAR},
      data_state = #{dataState,jdbcType=INTEGER},
      create_empid = #{createEmpid,jdbcType=VARCHAR},
      create_name = #{createName,jdbcType=VARCHAR},
      create_date = #{createDate,jdbcType=TIMESTAMP},
      modify_empid = #{modifyEmpid,jdbcType=VARCHAR},
      modify_name = #{modifyName,jdbcType=VARCHAR},
      modify_date = #{modifyDate,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>