<?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.tamguo.dao.CourseMapper">

	<select id="findBySubjectId" resultType="CourseEntity">
		SELECT
			c.uid,
			c.`name`,
			c.orders,
			c.point_num,
			c.question_num,
			c.subject_id
		FROM
			tiku_course c
		WHERE
			c.subject_id = #{subjectId}
		ORDER BY orders ASC
	</select>
	
	<select id="findByCourseId" resultType="ChapterEntity">
		SELECT
			c.uid,c.course_id , c.parent_id , c.`name` , c.question_num , c.point_num , c.orders
		FROM
			tiku_chapter c
		WHERE c.course_id = #{courseId}
		ORDER BY c.uid asc
	</select>
	
</mapper>