<?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.admin.dao.BookMapper">

	<select id="queryPage" resultType="BookEntity">
		SELECT
			b.uid,
			b.course_id,
			c. name as course_name,
			b. name,
			b.publishing_house,
			b.question_num,
			b.point_num,
			b.orders
		FROM
			tiku_book b
		LEFT JOIN tiku_course c ON b.course_id = c.uid
		<where>
			<if test="name != null and name != ''">
				b.name like #{name}
			</if>
		</where>
	</select>
	
</mapper>