<?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="com.test.test.mapper.TestPlanReportMapper">

  <insert id="insertTestPlanReport" parameterType="testPlanAddQO">
    insert into test_plan_report
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="planId != null and planId != ''">plan_id,</if>
      <if test="reportId != null and reportId != ''">report_id,</if>
      <if test="type != null">type,</if>
      <if test="createTime != null">create_time,</if>
      <if test="updateTime != null">update_time,</if>
      <if test="version != null">version,</if>
      <if test="delFlag != null and delFlag != ''">del_flag,</if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="planId != null and planId != ''">#{planId},</if>
      <if test="reportId != null and reportId != ''">#{reportId},</if>
      <if test="type != null">#{type},</if>
      <if test="createTime != null">#{createTime},</if>
      <if test="updateTime != null">#{updateTime},</if>
      <if test="version != null">#{version},</if>
      <if test="delFlag != null and delFlag != ''">#{delFlag},</if>
    </trim>
  </insert>
</mapper>