<?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.sapi.mapper.notice.NoticeSchoolMapper">
    <!--批量添加-->
    <insert id="batchSave" parameterType="com.xhkjedu.sapi.model.notice.TNotice">
        INSERT INTO t_notice_school (noticeid,schoolid,createid,createtime)
        VALUES
        <foreach collection ="notice.schools" item="school" index= "index" separator =",">
            (#{notice.noticeid},#{school.schoolid},#{notice.createid},#{notice.createtime})
        </foreach>
    </insert>
    <!--删除通知对象-->
    <delete id="deleteByNoticeId">
        delete from t_notice_school where noticeid=#{noticeid}
    </delete>
</mapper>
