<?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.ynfy.buss.exam.paper.mapper.PaperMapper">

    <select id="getExamIdPaper" resultType="com.ynfy.buss.exam.paper.entity.Paper">
        select p.* from
            exam e
                LEFT JOIN exam_papers ep on e.id=ep.exam_id
                left join paper p on ep.paper_id=p.id
        where e.id=#{examId}
    </select>
</mapper>