<?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.slive.mapper.xz.XzKjMapper">

    <!--获取行政直播课节详情-->
    <select id="listXzKjsByXzid" resultType="com.xhkjedu.slive.vo.xz.XzDateKjVo">
        select * from l_xz_kj where xzid=#{xzid} order by kjorder asc
    </select>

    <!--批量修改行政直播课节详情-->
    <update id="updateBatchXzKj" parameterType="java.util.List">
        <foreach collection="list" item="kj" index="index" separator=";">
            update l_xz_kj set kjname=#{kj.kjname},begintime=#{kj.begintime},endtime=#{kj.endtime}
            where kjid=#{kj.kjid}
        </foreach>
    </update>
    <!--获取行政直播课节详情-->
    <select id="listXzKjByXzId" resultType="com.xhkjedu.slive.vo.xz.XzKjVo">
        select k.kjid,k.kjname,k.kjorder,k.begintime,k.endtime,s.courseid,s.sectiondate,s.sectionstate
        from l_xz_kj k left join l_course c on c.kjid=k.kjid
        left join l_course_section s on s.courseid=c.courseid
        where k.xzid=#{xzid}
    </select>
</mapper>
