<?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.fs.course.mapper.HyWatchLogMapper">

    <resultMap type="HyWatchLog" id="HyWatchLogResult">
        <result property="id"    column="id"    />
        <result property="extId"    column="ext_id"    />
        <result property="qwUserId"    column="qw_user_id"    />
        <result property="status"    column="status"    />
        <result property="day"    column="day"    />
        <result property="project"    column="project"    />
        <result property="createTime"    column="create_time"    />
        <result property="lineTime"    column="line_time"    />
    </resultMap>

    <sql id="selectQwWatchLogVo">
        select id, ext_id, qw_user_id,line_time, status, day, project, create_time from hy_watch_log
    </sql>
    <insert id="insertHyWatchLogBatch">
        INSERT INTO hy_watch_log (
        ext_id,
        qw_user_id,
        status,
        day,
        project,
        company_id,
        company_user_id,
        create_time,
        line_time,
        course_id,
        video_id,
        fs_user_id
        )
        VALUES
        <foreach collection="hyWatchLogs" item="log" separator=",">
            (
            #{log.extId},
            #{log.qwUserId},
            #{log.status},
            #{log.day},
            #{log.project},
            #{log.companyId},
            #{log.companyUserId},
            #{log.createTime},
            #{log.lineTime},
            #{log.courseId},
            #{log.videoId},
            #{log.fsUserId}
            )
        </foreach>
    </insert>

</mapper>
