<?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.TestPlanReportDataMapper">
  <resultMap id="BaseResultMap" type="io.dataease.base.domain.TestPlanReportData">
    <id column="id" jdbcType="VARCHAR" property="id" />
    <result column="test_plan_report_id" jdbcType="VARCHAR" property="testPlanReportId" />
  </resultMap>
  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.dataease.base.domain.TestPlanReportDataWithBLOBs">
    <result column="execute_result" jdbcType="LONGVARCHAR" property="executeResult" />
    <result column="failur_test_cases" jdbcType="LONGVARCHAR" property="failurTestCases" />
    <result column="module_execute_result" jdbcType="LONGVARCHAR" property="moduleExecuteResult" />
    <result column="api_case_info" jdbcType="LONGVARCHAR" property="apiCaseInfo" />
    <result column="scenario_info" jdbcType="LONGVARCHAR" property="scenarioInfo" />
    <result column="performance_info" jdbcType="LONGVARCHAR" property="performanceInfo" />
    <result column="issues_info" jdbcType="LONGVARCHAR" property="issuesInfo" />
  </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, test_plan_report_id
  </sql>
  <sql id="Blob_Column_List">
    execute_result, failur_test_cases, module_execute_result, api_case_info, scenario_info,
    performance_info, issues_info
  </sql>
  <select id="selectByExampleWithBLOBs" parameterType="io.dataease.base.domain.TestPlanReportDataExample" resultMap="ResultMapWithBLOBs">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from test_plan_report_data
    <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.TestPlanReportDataExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from test_plan_report_data
    <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 test_plan_report_data
    where id = #{id,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    delete from test_plan_report_data
    where id = #{id,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="io.dataease.base.domain.TestPlanReportDataExample">
    delete from test_plan_report_data
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="io.dataease.base.domain.TestPlanReportDataWithBLOBs">
    insert into test_plan_report_data (id, test_plan_report_id, execute_result,
      failur_test_cases, module_execute_result,
      api_case_info, scenario_info, performance_info,
      issues_info)
    values (#{id,jdbcType=VARCHAR}, #{testPlanReportId,jdbcType=VARCHAR}, #{executeResult,jdbcType=LONGVARCHAR},
      #{failurTestCases,jdbcType=LONGVARCHAR}, #{moduleExecuteResult,jdbcType=LONGVARCHAR},
      #{apiCaseInfo,jdbcType=LONGVARCHAR}, #{scenarioInfo,jdbcType=LONGVARCHAR}, #{performanceInfo,jdbcType=LONGVARCHAR},
      #{issuesInfo,jdbcType=LONGVARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="io.dataease.base.domain.TestPlanReportDataWithBLOBs">
    insert into test_plan_report_data
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="testPlanReportId != null">
        test_plan_report_id,
      </if>
      <if test="executeResult != null">
        execute_result,
      </if>
      <if test="failurTestCases != null">
        failur_test_cases,
      </if>
      <if test="moduleExecuteResult != null">
        module_execute_result,
      </if>
      <if test="apiCaseInfo != null">
        api_case_info,
      </if>
      <if test="scenarioInfo != null">
        scenario_info,
      </if>
      <if test="performanceInfo != null">
        performance_info,
      </if>
      <if test="issuesInfo != null">
        issues_info,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=VARCHAR},
      </if>
      <if test="testPlanReportId != null">
        #{testPlanReportId,jdbcType=VARCHAR},
      </if>
      <if test="executeResult != null">
        #{executeResult,jdbcType=LONGVARCHAR},
      </if>
      <if test="failurTestCases != null">
        #{failurTestCases,jdbcType=LONGVARCHAR},
      </if>
      <if test="moduleExecuteResult != null">
        #{moduleExecuteResult,jdbcType=LONGVARCHAR},
      </if>
      <if test="apiCaseInfo != null">
        #{apiCaseInfo,jdbcType=LONGVARCHAR},
      </if>
      <if test="scenarioInfo != null">
        #{scenarioInfo,jdbcType=LONGVARCHAR},
      </if>
      <if test="performanceInfo != null">
        #{performanceInfo,jdbcType=LONGVARCHAR},
      </if>
      <if test="issuesInfo != null">
        #{issuesInfo,jdbcType=LONGVARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="io.dataease.base.domain.TestPlanReportDataExample" resultType="java.lang.Long">
    select count(*) from test_plan_report_data
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update test_plan_report_data
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=VARCHAR},
      </if>
      <if test="record.testPlanReportId != null">
        test_plan_report_id = #{record.testPlanReportId,jdbcType=VARCHAR},
      </if>
      <if test="record.executeResult != null">
        execute_result = #{record.executeResult,jdbcType=LONGVARCHAR},
      </if>
      <if test="record.failurTestCases != null">
        failur_test_cases = #{record.failurTestCases,jdbcType=LONGVARCHAR},
      </if>
      <if test="record.moduleExecuteResult != null">
        module_execute_result = #{record.moduleExecuteResult,jdbcType=LONGVARCHAR},
      </if>
      <if test="record.apiCaseInfo != null">
        api_case_info = #{record.apiCaseInfo,jdbcType=LONGVARCHAR},
      </if>
      <if test="record.scenarioInfo != null">
        scenario_info = #{record.scenarioInfo,jdbcType=LONGVARCHAR},
      </if>
      <if test="record.performanceInfo != null">
        performance_info = #{record.performanceInfo,jdbcType=LONGVARCHAR},
      </if>
      <if test="record.issuesInfo != null">
        issues_info = #{record.issuesInfo,jdbcType=LONGVARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExampleWithBLOBs" parameterType="map">
    update test_plan_report_data
    set id = #{record.id,jdbcType=VARCHAR},
      test_plan_report_id = #{record.testPlanReportId,jdbcType=VARCHAR},
      execute_result = #{record.executeResult,jdbcType=LONGVARCHAR},
      failur_test_cases = #{record.failurTestCases,jdbcType=LONGVARCHAR},
      module_execute_result = #{record.moduleExecuteResult,jdbcType=LONGVARCHAR},
      api_case_info = #{record.apiCaseInfo,jdbcType=LONGVARCHAR},
      scenario_info = #{record.scenarioInfo,jdbcType=LONGVARCHAR},
      performance_info = #{record.performanceInfo,jdbcType=LONGVARCHAR},
      issues_info = #{record.issuesInfo,jdbcType=LONGVARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update test_plan_report_data
    set id = #{record.id,jdbcType=VARCHAR},
      test_plan_report_id = #{record.testPlanReportId,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="io.dataease.base.domain.TestPlanReportDataWithBLOBs">
    update test_plan_report_data
    <set>
      <if test="testPlanReportId != null">
        test_plan_report_id = #{testPlanReportId,jdbcType=VARCHAR},
      </if>
      <if test="executeResult != null">
        execute_result = #{executeResult,jdbcType=LONGVARCHAR},
      </if>
      <if test="failurTestCases != null">
        failur_test_cases = #{failurTestCases,jdbcType=LONGVARCHAR},
      </if>
      <if test="moduleExecuteResult != null">
        module_execute_result = #{moduleExecuteResult,jdbcType=LONGVARCHAR},
      </if>
      <if test="apiCaseInfo != null">
        api_case_info = #{apiCaseInfo,jdbcType=LONGVARCHAR},
      </if>
      <if test="scenarioInfo != null">
        scenario_info = #{scenarioInfo,jdbcType=LONGVARCHAR},
      </if>
      <if test="performanceInfo != null">
        performance_info = #{performanceInfo,jdbcType=LONGVARCHAR},
      </if>
      <if test="issuesInfo != null">
        issues_info = #{issuesInfo,jdbcType=LONGVARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKeyWithBLOBs" parameterType="io.dataease.base.domain.TestPlanReportDataWithBLOBs">
    update test_plan_report_data
    set test_plan_report_id = #{testPlanReportId,jdbcType=VARCHAR},
      execute_result = #{executeResult,jdbcType=LONGVARCHAR},
      failur_test_cases = #{failurTestCases,jdbcType=LONGVARCHAR},
      module_execute_result = #{moduleExecuteResult,jdbcType=LONGVARCHAR},
      api_case_info = #{apiCaseInfo,jdbcType=LONGVARCHAR},
      scenario_info = #{scenarioInfo,jdbcType=LONGVARCHAR},
      performance_info = #{performanceInfo,jdbcType=LONGVARCHAR},
      issues_info = #{issuesInfo,jdbcType=LONGVARCHAR}
    where id = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="io.dataease.base.domain.TestPlanReportData">
    update test_plan_report_data
    set test_plan_report_id = #{testPlanReportId,jdbcType=VARCHAR}
    where id = #{id,jdbcType=VARCHAR}
  </update>
</mapper>
