<?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.yida.data.school.secondClass.mapper.EduSecondClassSubjectMapper">
  <select id="listSubject" resultType="com.yida.data.school.vo.secondClass.SubjectVO">
    select id,
           name,
           icon,
           type,
           content_type,
           orientation,
           row_num,
           topic_type
    from edu_second_class_subject
      where del_flag = 0
        and topic_type = #{topicType}
        and dept_id = #{deptId}
    <if test="type != null">
      and type = #{type}
    </if>
    order by sort
  </select>
</mapper>
