<?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.qmth.teachcloud.report.business.mapper.TBStudentMapper">

    <select id="getStudentBySchoolIdAndStudentCode"
            resultType="com.qmth.teachcloud.report.business.bean.result.StudentInfo">
        SELECT
            a.student_code studentCode, b.name school, a.name
        FROM
            t_b_student a
                LEFT JOIN
            basic_school b ON a.school_id = b.id
        <where>
            and a.school_id = #{schoolId}
            and a.student_code = #{studentCode}
        </where>
    </select>
</mapper>
