<?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="io.dataease.base.mapper.LoadTestReportLogMapper">
  <resultMap id="BaseResultMap" type="io.dataease.base.domain.LoadTestReportLog">
    <id column="id" jdbcType="VARCHAR" property="id" />
    <result column="report_id" jdbcType="VARCHAR" property="reportId" />
    <result column="resource_id" jdbcType="VARCHAR" property="resourceId" />
    <result column="part" jdbcType="BIGINT" property="part"/>
  </resultMap>
  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.dataease.base.domain.LoadTestReportLog">
    <result column="content" jdbcType="LONGVARCHAR" property="content" />
  </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,
          report_id,
          resource_id,
          part
  </sql>
  <sql id="Blob_Column_List">
    content
  </sql>
  <select id="selectByExampleWithBLOBs" parameterType="io.dataease.base.domain.LoadTestReportLogExample" resultMap="ResultMapWithBLOBs">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from load_test_report_log
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByExample" parameterType="io.dataease.base.domain.LoadTestReportLogExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from load_test_report_log
    <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.String" resultMap="ResultMapWithBLOBs">
    select
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from load_test_report_log
    where id = #{id,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    delete from load_test_report_log
    where id = #{id,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="io.dataease.base.domain.LoadTestReportLogExample">
    delete from load_test_report_log
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="io.dataease.base.domain.LoadTestReportLog">
      insert into load_test_report_log (id, report_id, resource_id,
      part, content)
      values (#{id,jdbcType=VARCHAR}, #{reportId,jdbcType=VARCHAR}, #{resourceId,jdbcType=VARCHAR},
      #{part,jdbcType=BIGINT}, #{content,jdbcType=LONGVARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="io.dataease.base.domain.LoadTestReportLog">
    insert into load_test_report_log
      <trim prefix="(" suffix=")" suffixOverrides=",">
          <if test="id != null">
              id,
          </if>
          <if test="reportId != null">
              report_id,
          </if>
          <if test="resourceId != null">
              resource_id,
          </if>
          <if test="part != null">
              part,
          </if>
          <if test="content != null">
              content,
          </if>
      </trim>
      <trim prefix="values (" suffix=")" suffixOverrides=",">
          <if test="id != null">
              #{id,jdbcType=VARCHAR},
          </if>
          <if test="reportId != null">
              #{reportId,jdbcType=VARCHAR},
          </if>
          <if test="resourceId != null">
              #{resourceId,jdbcType=VARCHAR},
          </if>
          <if test="part != null">
              #{part,jdbcType=BIGINT},
          </if>
          <if test="content != null">
              #{content,jdbcType=LONGVARCHAR},
          </if>
      </trim>
  </insert>
  <select id="countByExample" parameterType="io.dataease.base.domain.LoadTestReportLogExample" resultType="java.lang.Long">
    select count(*) from load_test_report_log
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update load_test_report_log
      <set>
          <if test="record.id != null">
              id = #{record.id,jdbcType=VARCHAR},
          </if>
          <if test="record.reportId != null">
              report_id = #{record.reportId,jdbcType=VARCHAR},
          </if>
          <if test="record.resourceId != null">
              resource_id = #{record.resourceId,jdbcType=VARCHAR},
          </if>
          <if test="record.part != null">
              part = #{record.part,jdbcType=BIGINT},
          </if>
          <if test="record.content != null">
              content = #{record.content,jdbcType=LONGVARCHAR},
          </if>
      </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExampleWithBLOBs" parameterType="map">
      update load_test_report_log
      set id = #{record.id,jdbcType=VARCHAR},
      report_id = #{record.reportId,jdbcType=VARCHAR},
      resource_id = #{record.resourceId,jdbcType=VARCHAR},
      part = #{record.part,jdbcType=BIGINT},
      content = #{record.content,jdbcType=LONGVARCHAR}
      <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
      update load_test_report_log
      set id = #{record.id,jdbcType=VARCHAR},
      report_id = #{record.reportId,jdbcType=VARCHAR},
      resource_id = #{record.resourceId,jdbcType=VARCHAR},
      part = #{record.part,jdbcType=BIGINT}
      <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="io.dataease.base.domain.LoadTestReportLog">
    update load_test_report_log
      <set>
          <if test="reportId != null">
              report_id = #{reportId,jdbcType=VARCHAR},
          </if>
          <if test="resourceId != null">
              resource_id = #{resourceId,jdbcType=VARCHAR},
          </if>
          <if test="part != null">
              part = #{part,jdbcType=BIGINT},
          </if>
          <if test="content != null">
              content = #{content,jdbcType=LONGVARCHAR},
          </if>
      </set>
    where id = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKeyWithBLOBs" parameterType="io.dataease.base.domain.LoadTestReportLog">
      update load_test_report_log
      set report_id = #{reportId,jdbcType=VARCHAR},
      resource_id = #{resourceId,jdbcType=VARCHAR},
      part = #{part,jdbcType=BIGINT},
      content = #{content,jdbcType=LONGVARCHAR}
      where id = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="io.dataease.base.domain.LoadTestReportLog">
      update load_test_report_log
      set report_id = #{reportId,jdbcType=VARCHAR},
      resource_id = #{resourceId,jdbcType=VARCHAR},
      part = #{part,jdbcType=BIGINT}
      where id = #{id,jdbcType=VARCHAR}
  </update>
</mapper>
