CouponsReceiptMapper.xml 7.04 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="cn.runsa.crmapp.coupon.mapper.CouponsReceiptMapper">
  <resultMap id="BaseResultMap" type="cn.runsa.crmapp.coupon.entity.CouponsReceipt">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="ID" jdbcType="VARCHAR" property="id" />
    <result column="CHANNEL" jdbcType="VARCHAR" property="channel" />
    <result column="USR" jdbcType="VARCHAR" property="usr" />
    <result column="TYPE" jdbcType="VARCHAR" property="type" />
    <result column="BIZ_TYPE" jdbcType="VARCHAR" property="bizType" />
    <result column="BIZ_NO" jdbcType="VARCHAR" property="bizNo" />
    <result column="CST_ID" jdbcType="BIGINT" property="cstId" />
    <result column="CPN_ID" jdbcType="VARCHAR" property="cpnId" />
    <result column="CPL_ID" jdbcType="VARCHAR" property="cplId" />
    <result column="AMOUNT" jdbcType="INTEGER" property="amount" />
    <result column="REMARK" jdbcType="VARCHAR" property="remark" />
    <result column="REC_TIME" jdbcType="TIMESTAMP" property="recTime" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    `ID`, `CHANNEL`, `USR`, `TYPE`, `BIZ_TYPE`, `BIZ_NO`, `CST_ID`, `CPN_ID`, `CPL_ID`, 
    `AMOUNT`, `REMARK`, `REC_TIME`
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    from crm_coupons_receipt
    where `ID` = #{id,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from crm_coupons_receipt
    where `ID` = #{id,jdbcType=VARCHAR}
  </delete>
  <insert id="insert" parameterType="cn.runsa.crmapp.coupon.entity.CouponsReceipt">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into crm_coupons_receipt (`ID`, `CHANNEL`, `USR`, 
      `TYPE`, `BIZ_TYPE`, `BIZ_NO`, 
      `CST_ID`, `CPN_ID`, `CPL_ID`, 
      `AMOUNT`, `REMARK`, `REC_TIME`
      )
    values (#{id,jdbcType=VARCHAR}, #{channel,jdbcType=VARCHAR}, #{usr,jdbcType=VARCHAR}, 
      #{type,jdbcType=VARCHAR}, #{bizType,jdbcType=VARCHAR}, #{bizNo,jdbcType=VARCHAR}, 
      #{cstId,jdbcType=BIGINT}, #{cpnId,jdbcType=VARCHAR}, #{cplId,jdbcType=VARCHAR}, 
      #{amount,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR}, #{recTime,jdbcType=TIMESTAMP}
      )
  </insert>
  <insert id="insertSelective" parameterType="cn.runsa.crmapp.coupon.entity.CouponsReceipt">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into crm_coupons_receipt
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        `ID`,
      </if>
      <if test="channel != null">
        `CHANNEL`,
      </if>
      <if test="usr != null">
        `USR`,
      </if>
      <if test="type != null">
        `TYPE`,
      </if>
      <if test="bizType != null">
        `BIZ_TYPE`,
      </if>
      <if test="bizNo != null">
        `BIZ_NO`,
      </if>
      <if test="cstId != null">
        `CST_ID`,
      </if>
      <if test="cpnId != null">
        `CPN_ID`,
      </if>
      <if test="cplId != null">
        `CPL_ID`,
      </if>
      <if test="amount != null">
        `AMOUNT`,
      </if>
      <if test="remark != null">
        `REMARK`,
      </if>
      <if test="recTime != null">
        `REC_TIME`,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=VARCHAR},
      </if>
      <if test="channel != null">
        #{channel,jdbcType=VARCHAR},
      </if>
      <if test="usr != null">
        #{usr,jdbcType=VARCHAR},
      </if>
      <if test="type != null">
        #{type,jdbcType=VARCHAR},
      </if>
      <if test="bizType != null">
        #{bizType,jdbcType=VARCHAR},
      </if>
      <if test="bizNo != null">
        #{bizNo,jdbcType=VARCHAR},
      </if>
      <if test="cstId != null">
        #{cstId,jdbcType=BIGINT},
      </if>
      <if test="cpnId != null">
        #{cpnId,jdbcType=VARCHAR},
      </if>
      <if test="cplId != null">
        #{cplId,jdbcType=VARCHAR},
      </if>
      <if test="amount != null">
        #{amount,jdbcType=INTEGER},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="recTime != null">
        #{recTime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="cn.runsa.crmapp.coupon.entity.CouponsReceipt">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update crm_coupons_receipt
    <set>
      <if test="channel != null">
        `CHANNEL` = #{channel,jdbcType=VARCHAR},
      </if>
      <if test="usr != null">
        `USR` = #{usr,jdbcType=VARCHAR},
      </if>
      <if test="type != null">
        `TYPE` = #{type,jdbcType=VARCHAR},
      </if>
      <if test="bizType != null">
        `BIZ_TYPE` = #{bizType,jdbcType=VARCHAR},
      </if>
      <if test="bizNo != null">
        `BIZ_NO` = #{bizNo,jdbcType=VARCHAR},
      </if>
      <if test="cstId != null">
        `CST_ID` = #{cstId,jdbcType=BIGINT},
      </if>
      <if test="cpnId != null">
        `CPN_ID` = #{cpnId,jdbcType=VARCHAR},
      </if>
      <if test="cplId != null">
        `CPL_ID` = #{cplId,jdbcType=VARCHAR},
      </if>
      <if test="amount != null">
        `AMOUNT` = #{amount,jdbcType=INTEGER},
      </if>
      <if test="remark != null">
        `REMARK` = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="recTime != null">
        `REC_TIME` = #{recTime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where `ID` = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="cn.runsa.crmapp.coupon.entity.CouponsReceipt">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update crm_coupons_receipt
    set `CHANNEL` = #{channel,jdbcType=VARCHAR},
      `USR` = #{usr,jdbcType=VARCHAR},
      `TYPE` = #{type,jdbcType=VARCHAR},
      `BIZ_TYPE` = #{bizType,jdbcType=VARCHAR},
      `BIZ_NO` = #{bizNo,jdbcType=VARCHAR},
      `CST_ID` = #{cstId,jdbcType=BIGINT},
      `CPN_ID` = #{cpnId,jdbcType=VARCHAR},
      `CPL_ID` = #{cplId,jdbcType=VARCHAR},
      `AMOUNT` = #{amount,jdbcType=INTEGER},
      `REMARK` = #{remark,jdbcType=VARCHAR},
      `REC_TIME` = #{recTime,jdbcType=TIMESTAMP}
    where `ID` = #{id,jdbcType=VARCHAR}
  </update>
</mapper>