<?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.TestReportMapper">

  <select id="selectTestReportList" parameterType="Long" resultType="TestReportVo">
    SELECT
      tr.name AS name,
      tr.result AS result,
      tr.status AS status,
      tpr.type AS type,
      tr.create_time AS createTime,
      tr.update_by AS updateBy
    FROM test_plan_report tpr
    LEFT JOIN test_report tr ON tr.id = tpr.report_id
    WHERE tpr.plan_id = #{planId}
      AND tpr.del_flag = '0'
  </select>
</mapper>