<?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.suser.mapper.subjectbook.TeacherSubjectbookMapper">
    <!-- 用户id获取教材集合 -->
    <select id="listLsbsByUserid" resultType="java.lang.String">
        SELECT lsbid FROM t_teacher_subjectbook WHERE teacherid=#{userid}
    </select>
    <!--删除教师收藏教材-->
    <delete id="deleteByLsbIdTeacherId">
        delete from t_teacher_subjectbook
        where teacherid=#{teacherid} and (
        <foreach collection="lsbids" item="lsbid" separator="or">
            lsbid=#{lsbid}
        </foreach>
        )
    </delete>
</mapper>
