<?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.sclass.mapper.classroom.ClassroomAskteacherMapper">
    <!--保存教师互动信息-->
    <insert id="save">
        insert ignore into t_classroom_askteacher
        (asktid,roomid,asktype,paperid,asknum,teacherpic,radionum,radioanswer,createtime,schoolid)
        values
        (#{r.asktid},#{r.roomid},#{r.asktype},#{r.paperid},#{r.asknum},#{r.teacherpic}
        ,#{r.radionum},#{r.radioanswer},#{r.createtime},#{r.schoolid})
    </insert>
    <!--批量保存教师互动信息-->
    <delete id="batchSave">
        insert ignore into t_classroom_askteacher
        (asktid,roomid,asktype,paperid,asknum,teacherpic,radionum,radioanswer,createtime,schoolid)
        values
        <foreach collection="teachers" item="r" separator=",">
            (#{r.asktid},#{r.roomid},#{r.asktype},#{r.paperid},#{r.asknum},#{r.teacherpic}
            ,#{r.radionum},#{r.radioanswer},#{r.createtime},#{r.schoolid})
        </foreach>
    </delete>
</mapper>
