TVipCardParkSaleRelMapper.xml 8.15 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.TVipCardParkSaleRelMapper">
  <resultMap id="BaseResultMap" type="com.zteits.bill.domain.TVipCardParkSaleRel">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="pl_no" jdbcType="VARCHAR" property="plNo" />
    <result column="card_no" jdbcType="VARCHAR" property="cardNo" />
    <result column="total_num" jdbcType="INTEGER" property="totalNum" />
    <result column="sell_num" jdbcType="INTEGER" property="sellNum" />
    <result column="price" jdbcType="BIGINT" property="price" />
    <result column="disc_no" jdbcType="VARCHAR" property="discNo" />
    <result column="disc_rule_no" jdbcType="VARCHAR" property="discRuleNo" />
    <result column="disc_value" jdbcType="VARCHAR" property="discValue" />
    <result column="data_state" jdbcType="INTEGER" property="dataState" />
    <result column="create_empid" jdbcType="BIGINT" property="createEmpid" />
    <result column="create_name" jdbcType="VARCHAR" property="createName" />
    <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
    <result column="modify_empid" jdbcType="BIGINT" 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, pl_no, card_no, total_num, sell_num, price, disc_no, disc_rule_no, disc_value, 
    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_vip_card_park_sale_rel
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from t_vip_card_park_sale_rel
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.zteits.bill.domain.TVipCardParkSaleRel">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into t_vip_card_park_sale_rel (pl_no, card_no, total_num, 
      sell_num, price, disc_no, 
      disc_rule_no, disc_value, data_state, 
      create_empid, create_name, create_date, 
      modify_empid, modify_name, modify_date
      )
    values (#{plNo,jdbcType=VARCHAR}, #{cardNo,jdbcType=VARCHAR}, #{totalNum,jdbcType=INTEGER}, 
      #{sellNum,jdbcType=INTEGER}, #{price,jdbcType=BIGINT}, #{discNo,jdbcType=VARCHAR}, 
      #{discRuleNo,jdbcType=VARCHAR}, #{discValue,jdbcType=VARCHAR}, #{dataState,jdbcType=INTEGER}, 
      #{createEmpid,jdbcType=BIGINT}, #{createName,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, 
      #{modifyEmpid,jdbcType=BIGINT}, #{modifyName,jdbcType=VARCHAR}, #{modifyDate,jdbcType=TIMESTAMP}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.bill.domain.TVipCardParkSaleRel">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into t_vip_card_park_sale_rel
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="plNo != null">
        pl_no,
      </if>
      <if test="cardNo != null">
        card_no,
      </if>
      <if test="totalNum != null">
        total_num,
      </if>
      <if test="sellNum != null">
        sell_num,
      </if>
      <if test="price != null">
        price,
      </if>
      <if test="discNo != null">
        disc_no,
      </if>
      <if test="discRuleNo != null">
        disc_rule_no,
      </if>
      <if test="discValue != null">
        disc_value,
      </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="plNo != null">
        #{plNo,jdbcType=VARCHAR},
      </if>
      <if test="cardNo != null">
        #{cardNo,jdbcType=VARCHAR},
      </if>
      <if test="totalNum != null">
        #{totalNum,jdbcType=INTEGER},
      </if>
      <if test="sellNum != null">
        #{sellNum,jdbcType=INTEGER},
      </if>
      <if test="price != null">
        #{price,jdbcType=BIGINT},
      </if>
      <if test="discNo != null">
        #{discNo,jdbcType=VARCHAR},
      </if>
      <if test="discRuleNo != null">
        #{discRuleNo,jdbcType=VARCHAR},
      </if>
      <if test="discValue != null">
        #{discValue,jdbcType=VARCHAR},
      </if>
      <if test="dataState != null">
        #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createEmpid != null">
        #{createEmpid,jdbcType=BIGINT},
      </if>
      <if test="createName != null">
        #{createName,jdbcType=VARCHAR},
      </if>
      <if test="createDate != null">
        #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyEmpid != null">
        #{modifyEmpid,jdbcType=BIGINT},
      </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.TVipCardParkSaleRel">
    update t_vip_card_park_sale_rel
    <set>
      <if test="plNo != null">
        pl_no = #{plNo,jdbcType=VARCHAR},
      </if>
      <if test="cardNo != null">
        card_no = #{cardNo,jdbcType=VARCHAR},
      </if>
      <if test="totalNum != null">
        total_num = #{totalNum,jdbcType=INTEGER},
      </if>
      <if test="sellNum != null">
        sell_num = #{sellNum,jdbcType=INTEGER},
      </if>
      <if test="price != null">
        price = #{price,jdbcType=BIGINT},
      </if>
      <if test="discNo != null">
        disc_no = #{discNo,jdbcType=VARCHAR},
      </if>
      <if test="discRuleNo != null">
        disc_rule_no = #{discRuleNo,jdbcType=VARCHAR},
      </if>
      <if test="discValue != null">
        disc_value = #{discValue,jdbcType=VARCHAR},
      </if>
      <if test="dataState != null">
        data_state = #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createEmpid != null">
        create_empid = #{createEmpid,jdbcType=BIGINT},
      </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=BIGINT},
      </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.TVipCardParkSaleRel">
    update t_vip_card_park_sale_rel
    set pl_no = #{plNo,jdbcType=VARCHAR},
      card_no = #{cardNo,jdbcType=VARCHAR},
      total_num = #{totalNum,jdbcType=INTEGER},
      sell_num = #{sellNum,jdbcType=INTEGER},
      price = #{price,jdbcType=BIGINT},
      disc_no = #{discNo,jdbcType=VARCHAR},
      disc_rule_no = #{discRuleNo,jdbcType=VARCHAR},
      disc_value = #{discValue,jdbcType=VARCHAR},
      data_state = #{dataState,jdbcType=INTEGER},
      create_empid = #{createEmpid,jdbcType=BIGINT},
      create_name = #{createName,jdbcType=VARCHAR},
      create_date = #{createDate,jdbcType=TIMESTAMP},
      modify_empid = #{modifyEmpid,jdbcType=BIGINT},
      modify_name = #{modifyName,jdbcType=VARCHAR},
      modify_date = #{modifyDate,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>