TaskResultMapper.xml 7.44 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.common.mapper.TaskResultMapper" >
  <resultMap id="BaseResultMap" type="cn.runsa.crmapp.common.entity.TaskResult" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="ID" property="id" jdbcType="BIGINT" />
    <result column="JOB_ID" property="jobId" jdbcType="VARCHAR" />
    <result column="BIZ" property="biz" jdbcType="VARCHAR" />
    <result column="OP" property="op" jdbcType="VARCHAR" />
    <result column="DESC" property="desc" jdbcType="VARCHAR" />
    <result column="RESULT" property="result" jdbcType="TINYINT" />
    <result column="FRI_TIME" property="friTime" jdbcType="TIMESTAMP" />
    <result column="SCD_TIME" property="scdTime" jdbcType="TIMESTAMP" />
    <result column="EXE_TIME" property="exeTime" jdbcType="BIGINT" />
  </resultMap>
  <resultMap id="ResultMapWithBLOBs" type="cn.runsa.crmapp.common.entity.TaskResult" extends="BaseResultMap" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <result column="REMARK" property="remark" jdbcType="LONGVARCHAR" />
  </resultMap>
  <sql id="Base_Column_List" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    `ID`, `JOB_ID`, `BIZ`, `OP`, `DESC`, `RESULT`, `FRI_TIME`, `SCD_TIME`, `EXE_TIME`
  </sql>
  <sql id="Blob_Column_List" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    `REMARK`
  </sql>
  <select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Long" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from crm_task_result
    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_task_result
    where `ID` = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="cn.runsa.crmapp.common.entity.TaskResult" >
    <!--
      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_task_result (`JOB_ID`, `BIZ`, `OP`, 
      `DESC`, `RESULT`, `FRI_TIME`, 
      `SCD_TIME`, `EXE_TIME`, `REMARK`
      )
    values (#{jobId,jdbcType=VARCHAR}, #{biz,jdbcType=VARCHAR}, #{op,jdbcType=VARCHAR}, 
      #{desc,jdbcType=VARCHAR}, #{result,jdbcType=TINYINT}, #{friTime,jdbcType=TIMESTAMP}, 
      #{scdTime,jdbcType=TIMESTAMP}, #{exeTime,jdbcType=BIGINT}, #{remark,jdbcType=LONGVARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="cn.runsa.crmapp.common.entity.TaskResult" >
    <!--
      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_task_result
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="jobId != null" >
        `JOB_ID`,
      </if>
      <if test="biz != null" >
        `BIZ`,
      </if>
      <if test="op != null" >
        `OP`,
      </if>
      <if test="desc != null" >
        `DESC`,
      </if>
      <if test="result != null" >
        `RESULT`,
      </if>
      <if test="friTime != null" >
        `FRI_TIME`,
      </if>
      <if test="scdTime != null" >
        `SCD_TIME`,
      </if>
      <if test="exeTime != null" >
        `EXE_TIME`,
      </if>
      <if test="remark != null" >
        `REMARK`,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="jobId != null" >
        #{jobId,jdbcType=VARCHAR},
      </if>
      <if test="biz != null" >
        #{biz,jdbcType=VARCHAR},
      </if>
      <if test="op != null" >
        #{op,jdbcType=VARCHAR},
      </if>
      <if test="desc != null" >
        #{desc,jdbcType=VARCHAR},
      </if>
      <if test="result != null" >
        #{result,jdbcType=TINYINT},
      </if>
      <if test="friTime != null" >
        #{friTime,jdbcType=TIMESTAMP},
      </if>
      <if test="scdTime != null" >
        #{scdTime,jdbcType=TIMESTAMP},
      </if>
      <if test="exeTime != null" >
        #{exeTime,jdbcType=BIGINT},
      </if>
      <if test="remark != null" >
        #{remark,jdbcType=LONGVARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="cn.runsa.crmapp.common.entity.TaskResult" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update crm_task_result
    <set >
      <if test="jobId != null" >
        `JOB_ID` = #{jobId,jdbcType=VARCHAR},
      </if>
      <if test="biz != null" >
        `BIZ` = #{biz,jdbcType=VARCHAR},
      </if>
      <if test="op != null" >
        `OP` = #{op,jdbcType=VARCHAR},
      </if>
      <if test="desc != null" >
        `DESC` = #{desc,jdbcType=VARCHAR},
      </if>
      <if test="result != null" >
        `RESULT` = #{result,jdbcType=TINYINT},
      </if>
      <if test="friTime != null" >
        `FRI_TIME` = #{friTime,jdbcType=TIMESTAMP},
      </if>
      <if test="scdTime != null" >
        `SCD_TIME` = #{scdTime,jdbcType=TIMESTAMP},
      </if>
      <if test="exeTime != null" >
        `EXE_TIME` = #{exeTime,jdbcType=BIGINT},
      </if>
      <if test="remark != null" >
        `REMARK` = #{remark,jdbcType=LONGVARCHAR},
      </if>
    </set>
    where `ID` = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKeyWithBLOBs" parameterType="cn.runsa.crmapp.common.entity.TaskResult" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update crm_task_result
    set `JOB_ID` = #{jobId,jdbcType=VARCHAR},
      `BIZ` = #{biz,jdbcType=VARCHAR},
      `OP` = #{op,jdbcType=VARCHAR},
      `DESC` = #{desc,jdbcType=VARCHAR},
      `RESULT` = #{result,jdbcType=TINYINT},
      `FRI_TIME` = #{friTime,jdbcType=TIMESTAMP},
      `SCD_TIME` = #{scdTime,jdbcType=TIMESTAMP},
      `EXE_TIME` = #{exeTime,jdbcType=BIGINT},
      `REMARK` = #{remark,jdbcType=LONGVARCHAR}
    where `ID` = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="cn.runsa.crmapp.common.entity.TaskResult" >
    <!--
      WARNING - @mbggenerated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update crm_task_result
    set `JOB_ID` = #{jobId,jdbcType=VARCHAR},
      `BIZ` = #{biz,jdbcType=VARCHAR},
      `OP` = #{op,jdbcType=VARCHAR},
      `DESC` = #{desc,jdbcType=VARCHAR},
      `RESULT` = #{result,jdbcType=TINYINT},
      `FRI_TIME` = #{friTime,jdbcType=TIMESTAMP},
      `SCD_TIME` = #{scdTime,jdbcType=TIMESTAMP},
      `EXE_TIME` = #{exeTime,jdbcType=BIGINT}
    where `ID` = #{id,jdbcType=BIGINT}
  </update>
</mapper>