CustomerFreezeMapper.xml 5.63 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.customer.mapper.CustomerFreezeMapper">
  <resultMap id="BaseResultMap" type="cn.runsa.crmapp.customer.entity.CustomerFreeze">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="FRZ_ID" jdbcType="BIGINT" property="frzId" />
    <result column="CST_ID" jdbcType="BIGINT" property="cstId" />
    <result column="FRZ_CAUSE" jdbcType="VARCHAR" property="frzCause" />
    <result column="FRZ_USER" jdbcType="BIGINT" property="frzUser" />
    <result column="S_TIME" jdbcType="TIMESTAMP" property="sTime" />
    <result column="E_TIME" jdbcType="TIMESTAMP" property="eTime" />
    <result column="REC_TIME" jdbcType="TIMESTAMP" property="recTime" />
    <result column="REMARK" jdbcType="VARCHAR" property="remark" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    `FRZ_ID`, `CST_ID`, `FRZ_CAUSE`, `FRZ_USER`, `S_TIME`, `E_TIME`, `REC_TIME`, `REMARK`
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    from crm_customer_freeze
    where `FRZ_ID` = #{frzId,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from crm_customer_freeze
    where `FRZ_ID` = #{frzId,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="cn.runsa.crmapp.customer.entity.CustomerFreeze">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into crm_customer_freeze (`FRZ_ID`, `CST_ID`, `FRZ_CAUSE`, 
      `FRZ_USER`, `S_TIME`, `E_TIME`, 
      `REC_TIME`, `REMARK`)
    values (#{frzId,jdbcType=BIGINT}, #{cstId,jdbcType=BIGINT}, #{frzCause,jdbcType=VARCHAR}, 
      #{frzUser,jdbcType=BIGINT}, #{sTime,jdbcType=TIMESTAMP}, #{eTime,jdbcType=TIMESTAMP}, 
      #{recTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="cn.runsa.crmapp.customer.entity.CustomerFreeze">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into crm_customer_freeze
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="frzId != null">
        `FRZ_ID`,
      </if>
      <if test="cstId != null">
        `CST_ID`,
      </if>
      <if test="frzCause != null">
        `FRZ_CAUSE`,
      </if>
      <if test="frzUser != null">
        `FRZ_USER`,
      </if>
      <if test="sTime != null">
        `S_TIME`,
      </if>
      <if test="eTime != null">
        `E_TIME`,
      </if>
      <if test="recTime != null">
        `REC_TIME`,
      </if>
      <if test="remark != null">
        `REMARK`,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="frzId != null">
        #{frzId,jdbcType=BIGINT},
      </if>
      <if test="cstId != null">
        #{cstId,jdbcType=BIGINT},
      </if>
      <if test="frzCause != null">
        #{frzCause,jdbcType=VARCHAR},
      </if>
      <if test="frzUser != null">
        #{frzUser,jdbcType=BIGINT},
      </if>
      <if test="sTime != null">
        #{sTime,jdbcType=TIMESTAMP},
      </if>
      <if test="eTime != null">
        #{eTime,jdbcType=TIMESTAMP},
      </if>
      <if test="recTime != null">
        #{recTime,jdbcType=TIMESTAMP},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="cn.runsa.crmapp.customer.entity.CustomerFreeze">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update crm_customer_freeze
    <set>
      <if test="cstId != null">
        `CST_ID` = #{cstId,jdbcType=BIGINT},
      </if>
      <if test="frzCause != null">
        `FRZ_CAUSE` = #{frzCause,jdbcType=VARCHAR},
      </if>
      <if test="frzUser != null">
        `FRZ_USER` = #{frzUser,jdbcType=BIGINT},
      </if>
      <if test="sTime != null">
        `S_TIME` = #{sTime,jdbcType=TIMESTAMP},
      </if>
      <if test="eTime != null">
        `E_TIME` = #{eTime,jdbcType=TIMESTAMP},
      </if>
      <if test="recTime != null">
        `REC_TIME` = #{recTime,jdbcType=TIMESTAMP},
      </if>
      <if test="remark != null">
        `REMARK` = #{remark,jdbcType=VARCHAR},
      </if>
    </set>
    where `FRZ_ID` = #{frzId,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="cn.runsa.crmapp.customer.entity.CustomerFreeze">
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update crm_customer_freeze
    set `CST_ID` = #{cstId,jdbcType=BIGINT},
      `FRZ_CAUSE` = #{frzCause,jdbcType=VARCHAR},
      `FRZ_USER` = #{frzUser,jdbcType=BIGINT},
      `S_TIME` = #{sTime,jdbcType=TIMESTAMP},
      `E_TIME` = #{eTime,jdbcType=TIMESTAMP},
      `REC_TIME` = #{recTime,jdbcType=TIMESTAMP},
      `REMARK` = #{remark,jdbcType=VARCHAR}
    where `FRZ_ID` = #{frzId,jdbcType=BIGINT}
  </update>
</mapper>