PointsAbnormalMapper.xml 7.19 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.points.mapper.PointsAbnormalMapper" >
  <resultMap id="BaseResultMap" type="cn.runsa.crmapp.points.entity.PointsAbnormal" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="ID" property="id" jdbcType="BIGINT" />
    <result column="TYPE" property="type" jdbcType="VARCHAR" />
    <result column="MODE" property="mode" jdbcType="TINYINT" />
    <result column="BIZ_TYPE" property="bizType" jdbcType="VARCHAR" />
    <result column="BIZ_NO" property="bizNo" jdbcType="VARCHAR" />
    <result column="CST_ID" property="cstId" jdbcType="BIGINT" />
    <result column="ACT_ID" property="actId" jdbcType="BIGINT" />
    <result column="PNT_TYPE" property="pntType" jdbcType="VARCHAR" />
    <result column="PNT_VAL" property="pntVal" jdbcType="DOUBLE" />
    <result column="FACT_VAL" property="factVal" jdbcType="DOUBLE" />
    <result column="REMARK" property="remark" jdbcType="VARCHAR" />
    <result column="REC_TIME" property="recTime" jdbcType="TIMESTAMP" />
  </resultMap>
  <sql id="Base_Column_List" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    `ID`, `TYPE`, `MODE`, `BIZ_TYPE`, `BIZ_NO`, `CST_ID`, `ACT_ID`, `PNT_TYPE`, `PNT_VAL`, 
    `FACT_VAL`, `REMARK`, `REC_TIME`
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    from crm_points_abnormal
    where `ID` = #{id,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_points_abnormal
    where `ID` = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="cn.runsa.crmapp.points.entity.PointsAbnormal" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <selectKey resultType="java.lang.Long" keyProperty="id" order="AFTER" >
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into crm_points_abnormal (`TYPE`, `MODE`, `BIZ_TYPE`, 
      `BIZ_NO`, `CST_ID`, `ACT_ID`, 
      `PNT_TYPE`, `PNT_VAL`, `FACT_VAL`, 
      `REMARK`, `REC_TIME`)
    values (#{type,jdbcType=VARCHAR}, #{mode,jdbcType=TINYINT}, #{bizType,jdbcType=VARCHAR}, 
      #{bizNo,jdbcType=VARCHAR}, #{cstId,jdbcType=BIGINT}, #{actId,jdbcType=BIGINT}, 
      #{pntType,jdbcType=VARCHAR}, #{pntVal,jdbcType=DOUBLE}, #{factVal,jdbcType=DOUBLE}, 
      #{remark,jdbcType=VARCHAR}, #{recTime,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="cn.runsa.crmapp.points.entity.PointsAbnormal" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <selectKey resultType="java.lang.Long" keyProperty="id" order="AFTER" >
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into crm_points_abnormal
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="type != null" >
        `TYPE`,
      </if>
      <if test="mode != null" >
        `MODE`,
      </if>
      <if test="bizType != null" >
        `BIZ_TYPE`,
      </if>
      <if test="bizNo != null" >
        `BIZ_NO`,
      </if>
      <if test="cstId != null" >
        `CST_ID`,
      </if>
      <if test="actId != null" >
        `ACT_ID`,
      </if>
      <if test="pntType != null" >
        `PNT_TYPE`,
      </if>
      <if test="pntVal != null" >
        `PNT_VAL`,
      </if>
      <if test="factVal != null" >
        `FACT_VAL`,
      </if>
      <if test="remark != null" >
        `REMARK`,
      </if>
      <if test="recTime != null" >
        `REC_TIME`,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="type != null" >
        #{type,jdbcType=VARCHAR},
      </if>
      <if test="mode != null" >
        #{mode,jdbcType=TINYINT},
      </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="actId != null" >
        #{actId,jdbcType=BIGINT},
      </if>
      <if test="pntType != null" >
        #{pntType,jdbcType=VARCHAR},
      </if>
      <if test="pntVal != null" >
        #{pntVal,jdbcType=DOUBLE},
      </if>
      <if test="factVal != null" >
        #{factVal,jdbcType=DOUBLE},
      </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.points.entity.PointsAbnormal" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update crm_points_abnormal
    <set >
      <if test="type != null" >
        `TYPE` = #{type,jdbcType=VARCHAR},
      </if>
      <if test="mode != null" >
        `MODE` = #{mode,jdbcType=TINYINT},
      </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="actId != null" >
        `ACT_ID` = #{actId,jdbcType=BIGINT},
      </if>
      <if test="pntType != null" >
        `PNT_TYPE` = #{pntType,jdbcType=VARCHAR},
      </if>
      <if test="pntVal != null" >
        `PNT_VAL` = #{pntVal,jdbcType=DOUBLE},
      </if>
      <if test="factVal != null" >
        `FACT_VAL` = #{factVal,jdbcType=DOUBLE},
      </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=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="cn.runsa.crmapp.points.entity.PointsAbnormal" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update crm_points_abnormal
    set `TYPE` = #{type,jdbcType=VARCHAR},
      `MODE` = #{mode,jdbcType=TINYINT},
      `BIZ_TYPE` = #{bizType,jdbcType=VARCHAR},
      `BIZ_NO` = #{bizNo,jdbcType=VARCHAR},
      `CST_ID` = #{cstId,jdbcType=BIGINT},
      `ACT_ID` = #{actId,jdbcType=BIGINT},
      `PNT_TYPE` = #{pntType,jdbcType=VARCHAR},
      `PNT_VAL` = #{pntVal,jdbcType=DOUBLE},
      `FACT_VAL` = #{factVal,jdbcType=DOUBLE},
      `REMARK` = #{remark,jdbcType=VARCHAR},
      `REC_TIME` = #{recTime,jdbcType=TIMESTAMP}
    where `ID` = #{id,jdbcType=BIGINT}
  </update>
</mapper>