TActivityParkSalseRelMapper.xml 7.99 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.TActivityParkSalseRelMapper">
  <resultMap id="BaseResultMap" type="com.zteits.bill.domain.TActivityParkSalseRel">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="card_no" jdbcType="VARCHAR" property="cardNo" />
    <result column="pl_no" jdbcType="VARCHAR" property="plNo" />
    <result column="card_type" jdbcType="INTEGER" property="cardType" />
    <result column="grant_amount" jdbcType="INTEGER" property="grantAmount" />
    <result column="already_g_amount" jdbcType="INTEGER" property="alreadyGAmount" />
    <result column="grant_count" jdbcType="INTEGER" property="grantCount" />
    <result column="uesed_count" jdbcType="INTEGER" property="uesedCount" />
    <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, card_no, pl_no, card_type, grant_amount, already_g_amount, grant_count, uesed_count, 
    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_park_salse_rel
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from t_activity_park_salse_rel
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.zteits.bill.domain.TActivityParkSalseRel">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into t_activity_park_salse_rel (card_no, pl_no, card_type, 
      grant_amount, already_g_amount, grant_count, 
      uesed_count, data_state, create_empid, 
      create_name, create_date, modify_empid, 
      modify_name, modify_date)
    values (#{cardNo,jdbcType=VARCHAR}, #{plNo,jdbcType=VARCHAR}, #{cardType,jdbcType=INTEGER}, 
      #{grantAmount,jdbcType=INTEGER}, #{alreadyGAmount,jdbcType=INTEGER}, #{grantCount,jdbcType=INTEGER}, 
      #{uesedCount,jdbcType=INTEGER}, #{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.TActivityParkSalseRel">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into t_activity_park_salse_rel
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="cardNo != null">
        card_no,
      </if>
      <if test="plNo != null">
        pl_no,
      </if>
      <if test="cardType != null">
        card_type,
      </if>
      <if test="grantAmount != null">
        grant_amount,
      </if>
      <if test="alreadyGAmount != null">
        already_g_amount,
      </if>
      <if test="grantCount != null">
        grant_count,
      </if>
      <if test="uesedCount != null">
        uesed_count,
      </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="cardNo != null">
        #{cardNo,jdbcType=VARCHAR},
      </if>
      <if test="plNo != null">
        #{plNo,jdbcType=VARCHAR},
      </if>
      <if test="cardType != null">
        #{cardType,jdbcType=INTEGER},
      </if>
      <if test="grantAmount != null">
        #{grantAmount,jdbcType=INTEGER},
      </if>
      <if test="alreadyGAmount != null">
        #{alreadyGAmount,jdbcType=INTEGER},
      </if>
      <if test="grantCount != null">
        #{grantCount,jdbcType=INTEGER},
      </if>
      <if test="uesedCount != null">
        #{uesedCount,jdbcType=INTEGER},
      </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.TActivityParkSalseRel">
    update t_activity_park_salse_rel
    <set>
      <if test="cardNo != null">
        card_no = #{cardNo,jdbcType=VARCHAR},
      </if>
      <if test="plNo != null">
        pl_no = #{plNo,jdbcType=VARCHAR},
      </if>
      <if test="cardType != null">
        card_type = #{cardType,jdbcType=INTEGER},
      </if>
      <if test="grantAmount != null">
        grant_amount = #{grantAmount,jdbcType=INTEGER},
      </if>
      <if test="alreadyGAmount != null">
        already_g_amount = #{alreadyGAmount,jdbcType=INTEGER},
      </if>
      <if test="grantCount != null">
        grant_count = #{grantCount,jdbcType=INTEGER},
      </if>
      <if test="uesedCount != null">
        uesed_count = #{uesedCount,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="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.TActivityParkSalseRel">
    update t_activity_park_salse_rel
    set card_no = #{cardNo,jdbcType=VARCHAR},
      pl_no = #{plNo,jdbcType=VARCHAR},
      card_type = #{cardType,jdbcType=INTEGER},
      grant_amount = #{grantAmount,jdbcType=INTEGER},
      already_g_amount = #{alreadyGAmount,jdbcType=INTEGER},
      grant_count = #{grantCount,jdbcType=INTEGER},
      uesed_count = #{uesedCount,jdbcType=INTEGER},
      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>