package com.fs.course.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fs.course.domain.FeiShuCourseWatchLog;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;


public interface FeiShuCourseWatchLogMapper extends BaseMapper<FeiShuCourseWatchLog> {

    /**
     * 根据视频ID和用户身份标识查询课程观看记录
     */
    @Select("select * from feishu_course_watch_log where video_id = #{videoId} and user_id = #{identifier} and company_user_id = #{companyUserId}")
    FeiShuCourseWatchLog getWatchLogByFsUser(@Param("videoId") Long videoId, @Param("identifier") Long identifier, @Param("companyUserId") Long companyUserId);

    /**
     * 修改看课记录
     */
    void updateByVideoIdAndUserIdAndCompanyUserIdAndPeriodId(FeiShuCourseWatchLog feishuCourseWatchLog);
}
