<?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.sstudy.mapper.resource.ResourceDirectorMapper">
    <!--删除资源关联章节信息-->
    <delete id="deleteByResourceid">
        delete from t_resource_director where resourceid=#{resourceid}
    </delete>
    <!--批量添加-->
    <insert id="batchSave" parameterType="com.xhkjedu.sstudy.model.resource.TResourceDirector">
        INSERT INTO t_resource_director (rdid,resourceid,lsbid,directorid,createid,createtime)
        VALUES
        <foreach collection ="list" item="d" index= "index" separator =",">
            (#{d.rdid},#{d.resourceid},#{d.lsbid},#{d.directorid},#{d.createid},#{d.createtime})
        </foreach>
    </insert>
</mapper>
