TdBParkCardRelMapper.xml 6.41 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.TdBParkCardRelMapper" >
  <resultMap id="BaseResultMap" type="com.zteits.pay.domain.TdBParkCardRel" >
    <id column="id" property="id" jdbcType="BIGINT" />
    <result column="pl_no" property="plNo" jdbcType="VARCHAR" />
    <result column="card_no" property="cardNo" jdbcType="VARCHAR" />
    <result column="total_num" property="totalNum" jdbcType="INTEGER" />
    <result column="sell_num" property="sellNum" jdbcType="INTEGER" />
    <result column="price" property="price" jdbcType="BIGINT" />
    <result column="discount_no" property="discountNo" jdbcType="VARCHAR" />
    <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>
  <sql id="Base_Column_List" >
    id, pl_no, card_no, total_num, sell_num, price, discount_no, data_state, create_empid, 
    create_date, modify_empid, modify_date
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
    select 
    <include refid="Base_Column_List" />
    from td_b_park_card_rel
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
    delete from td_b_park_card_rel
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.zteits.pay.domain.TdBParkCardRel" >
    <selectKey resultType="java.lang.Long" keyProperty="id" order="AFTER" >
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into td_b_park_card_rel (pl_no, card_no, total_num, 
      sell_num, price, discount_no, 
      data_state, create_empid, create_date, 
      modify_empid, modify_date)
    values (#{plNo,jdbcType=VARCHAR}, #{cardNo,jdbcType=VARCHAR}, #{totalNum,jdbcType=INTEGER}, 
      #{sellNum,jdbcType=INTEGER}, #{price,jdbcType=BIGINT}, #{discountNo,jdbcType=VARCHAR}, 
      #{dataState,jdbcType=INTEGER}, #{createEmpid,jdbcType=BIGINT}, #{createDate,jdbcType=TIMESTAMP}, 
      #{modifyEmpid,jdbcType=BIGINT}, #{modifyDate,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.pay.domain.TdBParkCardRel" >
    <selectKey resultType="java.lang.Long" keyProperty="id" order="AFTER" >
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into td_b_park_card_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="discountNo != null" >
        discount_no,
      </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>
    </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="discountNo != null" >
        #{discountNo,jdbcType=VARCHAR},
      </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>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.pay.domain.TdBParkCardRel" >
    update td_b_park_card_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="discountNo != null" >
        discount_no = #{discountNo,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="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>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.pay.domain.TdBParkCardRel" >
    update td_b_park_card_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},
      discount_no = #{discountNo,jdbcType=VARCHAR},
      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>