package com.fs.course.service;

import com.fs.common.core.domain.R;
import com.fs.common.core.domain.ResponseResult;
import com.fs.course.domain.FsUserCourseVideo;
import com.fs.course.param.*;
import com.fs.course.param.newfs.*;
import com.fs.course.vo.FsCourseVideoListBySidebarVO;
import com.fs.course.vo.FsUserCourseVideoListUVO;
import com.fs.course.vo.FsUserCourseVideoQVO;
import com.fs.course.vo.FsUserCourseVideoVO;
import com.fs.course.vo.newfs.FsUserCourseVideoDetailsVO;
import com.fs.course.vo.newfs.FsUserCourseVideoLinkDetailsVO;
import com.fs.course.vo.newfs.FsUserCourseVideoPageListVO;
import com.fs.course.vo.newfs.FsUserVideoListVO;
import com.fs.his.vo.OptionsVO;

import java.util.List;
import java.util.Map;

/**
 * 课堂视频Service接口
 *
 * @author fs
 * @date 2024-05-17
 */
public interface IFsUserCourseVideoService
{
    /**
     * 查询课堂视频
     *
     * @param videoId 课堂视频主键
     * @return 课堂视频
     */
    public FsUserCourseVideo selectFsUserCourseVideoByVideoId(Long videoId);
    public FsUserCourseVideoQVO selectFsUserCourseVideoByVideoIdVO(Long videoId);

    /**
     * 查询课堂视频列表
     *
     * @param fsUserCourseVideo 课堂视频
     * @return 课堂视频集合
     */
    public List<FsUserCourseVideo> selectFsUserCourseVideoList(FsUserCourseVideo fsUserCourseVideo);

    /**
     * 新增课堂视频
     *
     * @param fsUserCourseVideo 课堂视频
     * @return 结果
     */
    public int insertFsUserCourseVideo(FsUserCourseVideo fsUserCourseVideo);

    /**
     * 修改课堂视频
     *
     * @param fsUserCourseVideo 课堂视频
     * @return 结果
     */
    public int updateFsUserCourseVideo(FsUserCourseVideo fsUserCourseVideo);

    /**
     * 批量删除课堂视频
     *
     * @param videoIds 需要删除的课堂视频主键集合
     * @return 结果
     */
    public int deleteFsUserCourseVideoByVideoIds(String[] videoIds);

    /**
     * 删除课堂视频信息
     *
     * @param videoId 课堂视频主键
     * @return 结果
     */
    public int deleteFsUserCourseVideoByVideoId(String videoId);


    List<FsUserCourseVideo> selectFsUserCourseVideoListByCourseId(FsUserCourseVideo fsUserCourseVideo);


    List<FsUserCourseVideoListUVO> selectFsUserCourseVideoListUVOByCourseId(FsUserCourseVideoListUParam param);

    Long selectCourseVideoSort(Long courseId);

    R updateWatchDuration(FsUserCourseVideoFinishUParam param);

    R isAddKf(FsUserCourseVideoAddKfUParam param);

    List<FsUserCourseVideoVO> selectFsUserCourseVideoListByCourseIdAndCompany(FsUserCourseVideoParam fsUserCourseVideo);

    R updateFsUserCourseVideoCompanyRedPacket(FsUserCourseVideoParam fsUserCourseVideo);

    R getInternetTraffic(FsUserCourseVideoFinishUParam param);

    R getIntegralByH5Video(FsUserCourseVideoFinishUParam param);

    R sendReward(FsCourseSendRewardUParam param);

    R sendRewardByFsUser(FsCourseSendRewardUParam param);

    /**
     * 获取课程视频分页列表
     * @return FsUserCourseVideoPageListVO
     */
    List<FsUserCourseVideoPageListVO> pageListCourseVideo(UserCourseVideoPageParam param);

    /**
     * 获取课程视频详情
     * @return FsUserCourseVideoDetailsVO
     */
    ResponseResult<FsUserCourseVideoDetailsVO> getVideoDetails(Long videoId);

    R registerCourse(FsUserCourseRegisterParam param);

    /**
     * 获取下拉视频列表（有分页，仅返回两个字段）
     * @param param 入参
     * @return list
     */
    List<FsUserVideoListVO> getListCourseVideo(UserCourseVideoPageParam param);

    /**
     * 判断是否添加销售
     * @param param 入参
     * @return 是/否 成功
     */
    ResponseResult<Boolean> isAddCompanyUser(FsUserCourseAddCompanyUserParam param);

    /**
     * 获取链接用户课程详情
     * @param param 入参
     */
    ResponseResult<FsUserCourseVideoLinkDetailsVO> getLinkCourseVideoDetails(FsUserCourseVideoLinkParam param);


    R addWatchLogByLink(FsUserCourseAddCompanyUserParam param);

    /**
     * 更新看课时长
     * @param param 入参
     * @return
     */
    R updateWatchDurationWx(FsUserCourseVideoUParam param);

    void updates(CourseVideoUpdates vo);

    void batchSaveVideo(BatchVideoSvae vo);

    void batchUpdateRed(List<BatchRedUpdate> list);

    /**
     * 获取选项列表
     * @param params    参数
     * @return  list
     */
    List<OptionsVO> selectVideoListByMap(Map<String, Object> params);

    List<FsCourseVideoListBySidebarVO> getFsCourseVideoListBySidebar(FsCourseListBySidebarParam param);

    R createMiniLink(FsCourseLinkMiniParam param);

    /**
     * 查询课程列表
     * @param params 参数
     * @return  list
     */
    List<FsUserCourseVideoPageListVO> selectCourseVideoListByMap(Map<String, Object> params);

    /**
     * 销售设置课程看课时间
     * @param paramList 入参
     * @return
     */
    ResponseResult<Boolean> setWatchCourseTime(List<FsWatchCourseTimeParam> paramList);
}
