<?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.xhkjedu.sapi.mapper.subjectbook.SubjectMapper">

    <!-- 根据阶段获取科目用于选择学科 -->
    <select id="listSubjectsForSel" resultType="com.xhkjedu.sapi.vo.subjectbook.SubjectVo">
        SELECT subjectid,subjectname,belong from t_subject
        WHERE level=#{subject.level} and (belong=1
        <if test="subject.schoolid!=null">
            or schoolid=#{subject.schoolid}
        </if>
        ) order by subjectorder asc
    </select>
</mapper>
