TActivityAbcbankDiscountDescMapper.xml 13.6 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.TActivityAbcbankDiscountDescMapper">
  <resultMap id="BaseResultMap" type="com.zteits.bill.domain.TActivityAbcbankDiscountDesc">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="disc_no" jdbcType="VARCHAR" property="discNo" />
    <result column="recharge_amount" jdbcType="BIGINT" property="rechargeAmount" />
    <result column="Fixed_disc" jdbcType="INTEGER" property="fixedDisc" />
    <result column="subsidy_disc" jdbcType="INTEGER" property="subsidyDisc" />
    <result column="remarks" jdbcType="VARCHAR" property="remarks" />
    <result column="data_state" jdbcType="INTEGER" property="dataState" />
    <result column="create_emp_id" jdbcType="VARCHAR" property="createEmpId" />
    <result column="create_name" jdbcType="VARCHAR" property="createName" />
    <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
    <result column="modify_emp_id" jdbcType="VARCHAR" property="modifyEmpId" />
    <result column="modify_name" jdbcType="VARCHAR" property="modifyName" />
    <result column="modify_date" jdbcType="TIMESTAMP" property="modifyDate" />
    <result column="org_id" jdbcType="BIGINT" property="orgId" />
  </resultMap>
  <sql id="Example_Where_Clause">
    <where>
      <foreach collection="oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Update_By_Example_Where_Clause">
    <where>
      <foreach collection="example.oredCriteria" item="criteria" separator="or">
        <if test="criteria.valid">
          <trim prefix="(" prefixOverrides="and" suffix=")">
            <foreach collection="criteria.criteria" item="criterion">
              <choose>
                <when test="criterion.noValue">
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue">
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue">
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue">
                  and ${criterion.condition}
                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List">
    id, disc_no, recharge_amount, Fixed_disc, subsidy_disc, remarks, data_state, create_emp_id, 
    create_name, create_date, modify_emp_id, modify_name, modify_date, org_id
  </sql>
  <select id="selectByExample" parameterType="com.zteits.bill.domain.TActivityAbcbankDiscountDescExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from t_activity_abcbank_discount_desc
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from t_activity_abcbank_discount_desc
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from t_activity_abcbank_discount_desc
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="com.zteits.bill.domain.TActivityAbcbankDiscountDescExample">
    delete from t_activity_abcbank_discount_desc
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.zteits.bill.domain.TActivityAbcbankDiscountDesc">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into t_activity_abcbank_discount_desc (disc_no, recharge_amount, Fixed_disc, 
      subsidy_disc, remarks, data_state, 
      create_emp_id, create_name, create_date, 
      modify_emp_id, modify_name, modify_date, 
      org_id)
    values (#{discNo,jdbcType=VARCHAR}, #{rechargeAmount,jdbcType=BIGINT}, #{fixedDisc,jdbcType=INTEGER}, 
      #{subsidyDisc,jdbcType=INTEGER}, #{remarks,jdbcType=VARCHAR}, #{dataState,jdbcType=INTEGER}, 
      #{createEmpId,jdbcType=VARCHAR}, #{createName,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, 
      #{modifyEmpId,jdbcType=VARCHAR}, #{modifyName,jdbcType=VARCHAR}, #{modifyDate,jdbcType=TIMESTAMP}, 
      #{orgId,jdbcType=BIGINT})
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.bill.domain.TActivityAbcbankDiscountDesc">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into t_activity_abcbank_discount_desc
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="discNo != null">
        disc_no,
      </if>
      <if test="rechargeAmount != null">
        recharge_amount,
      </if>
      <if test="fixedDisc != null">
        Fixed_disc,
      </if>
      <if test="subsidyDisc != null">
        subsidy_disc,
      </if>
      <if test="remarks != null">
        remarks,
      </if>
      <if test="dataState != null">
        data_state,
      </if>
      <if test="createEmpId != null">
        create_emp_id,
      </if>
      <if test="createName != null">
        create_name,
      </if>
      <if test="createDate != null">
        create_date,
      </if>
      <if test="modifyEmpId != null">
        modify_emp_id,
      </if>
      <if test="modifyName != null">
        modify_name,
      </if>
      <if test="modifyDate != null">
        modify_date,
      </if>
      <if test="orgId != null">
        org_id,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="discNo != null">
        #{discNo,jdbcType=VARCHAR},
      </if>
      <if test="rechargeAmount != null">
        #{rechargeAmount,jdbcType=BIGINT},
      </if>
      <if test="fixedDisc != null">
        #{fixedDisc,jdbcType=INTEGER},
      </if>
      <if test="subsidyDisc != null">
        #{subsidyDisc,jdbcType=INTEGER},
      </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>
      <if test="orgId != null">
        #{orgId,jdbcType=BIGINT},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.zteits.bill.domain.TActivityAbcbankDiscountDescExample" resultType="java.lang.Long">
    select count(*) from t_activity_abcbank_discount_desc
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update t_activity_abcbank_discount_desc
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.discNo != null">
        disc_no = #{record.discNo,jdbcType=VARCHAR},
      </if>
      <if test="record.rechargeAmount != null">
        recharge_amount = #{record.rechargeAmount,jdbcType=BIGINT},
      </if>
      <if test="record.fixedDisc != null">
        Fixed_disc = #{record.fixedDisc,jdbcType=INTEGER},
      </if>
      <if test="record.subsidyDisc != null">
        subsidy_disc = #{record.subsidyDisc,jdbcType=INTEGER},
      </if>
      <if test="record.remarks != null">
        remarks = #{record.remarks,jdbcType=VARCHAR},
      </if>
      <if test="record.dataState != null">
        data_state = #{record.dataState,jdbcType=INTEGER},
      </if>
      <if test="record.createEmpId != null">
        create_emp_id = #{record.createEmpId,jdbcType=VARCHAR},
      </if>
      <if test="record.createName != null">
        create_name = #{record.createName,jdbcType=VARCHAR},
      </if>
      <if test="record.createDate != null">
        create_date = #{record.createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.modifyEmpId != null">
        modify_emp_id = #{record.modifyEmpId,jdbcType=VARCHAR},
      </if>
      <if test="record.modifyName != null">
        modify_name = #{record.modifyName,jdbcType=VARCHAR},
      </if>
      <if test="record.modifyDate != null">
        modify_date = #{record.modifyDate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.orgId != null">
        org_id = #{record.orgId,jdbcType=BIGINT},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update t_activity_abcbank_discount_desc
    set id = #{record.id,jdbcType=BIGINT},
      disc_no = #{record.discNo,jdbcType=VARCHAR},
      recharge_amount = #{record.rechargeAmount,jdbcType=BIGINT},
      Fixed_disc = #{record.fixedDisc,jdbcType=INTEGER},
      subsidy_disc = #{record.subsidyDisc,jdbcType=INTEGER},
      remarks = #{record.remarks,jdbcType=VARCHAR},
      data_state = #{record.dataState,jdbcType=INTEGER},
      create_emp_id = #{record.createEmpId,jdbcType=VARCHAR},
      create_name = #{record.createName,jdbcType=VARCHAR},
      create_date = #{record.createDate,jdbcType=TIMESTAMP},
      modify_emp_id = #{record.modifyEmpId,jdbcType=VARCHAR},
      modify_name = #{record.modifyName,jdbcType=VARCHAR},
      modify_date = #{record.modifyDate,jdbcType=TIMESTAMP},
      org_id = #{record.orgId,jdbcType=BIGINT}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.bill.domain.TActivityAbcbankDiscountDesc">
    update t_activity_abcbank_discount_desc
    <set>
      <if test="discNo != null">
        disc_no = #{discNo,jdbcType=VARCHAR},
      </if>
      <if test="rechargeAmount != null">
        recharge_amount = #{rechargeAmount,jdbcType=BIGINT},
      </if>
      <if test="fixedDisc != null">
        Fixed_disc = #{fixedDisc,jdbcType=INTEGER},
      </if>
      <if test="subsidyDisc != null">
        subsidy_disc = #{subsidyDisc,jdbcType=INTEGER},
      </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_emp_id = #{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_emp_id = #{modifyEmpId,jdbcType=VARCHAR},
      </if>
      <if test="modifyName != null">
        modify_name = #{modifyName,jdbcType=VARCHAR},
      </if>
      <if test="modifyDate != null">
        modify_date = #{modifyDate,jdbcType=TIMESTAMP},
      </if>
      <if test="orgId != null">
        org_id = #{orgId,jdbcType=BIGINT},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.bill.domain.TActivityAbcbankDiscountDesc">
    update t_activity_abcbank_discount_desc
    set disc_no = #{discNo,jdbcType=VARCHAR},
      recharge_amount = #{rechargeAmount,jdbcType=BIGINT},
      Fixed_disc = #{fixedDisc,jdbcType=INTEGER},
      subsidy_disc = #{subsidyDisc,jdbcType=INTEGER},
      remarks = #{remarks,jdbcType=VARCHAR},
      data_state = #{dataState,jdbcType=INTEGER},
      create_emp_id = #{createEmpId,jdbcType=VARCHAR},
      create_name = #{createName,jdbcType=VARCHAR},
      create_date = #{createDate,jdbcType=TIMESTAMP},
      modify_emp_id = #{modifyEmpId,jdbcType=VARCHAR},
      modify_name = #{modifyName,jdbcType=VARCHAR},
      modify_date = #{modifyDate,jdbcType=TIMESTAMP},
      org_id = #{orgId,jdbcType=BIGINT}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>