package com.yonge.cooleshow.biz.dal.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yonge.cooleshow.auth.api.entity.SysUser;
import com.yonge.cooleshow.biz.dal.dto.req.AuthOperaReq;
import com.yonge.cooleshow.biz.dal.dto.search.TeacherStyleSearch;
import com.yonge.cooleshow.biz.dal.dto.search.TeacherStyleVideoSearch;
import com.yonge.cooleshow.biz.dal.entity.TeacherStyleVideo;
import com.yonge.cooleshow.biz.dal.vo.TeacherStyleVideoVo;
import com.yonge.cooleshow.biz.dal.vo.TeacherVo;
import com.yonge.cooleshow.common.entity.HttpResponseResult;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 教师风采视频表 服务类
 * @author liweifan
 * @date 2022-03-24
 */
public interface TeacherStyleVideoService extends IService<TeacherStyleVideo>  {
    /**
     * 查询详情
     * @author liweifan
     * @date 2022-05-17
     */
    TeacherStyleVideoVo detail(Long id);

    /**
     * 分页查询
     * @author liweifan
     * @date 2022-05-17
     */
    IPage<TeacherStyleVideoVo> selectPage(IPage<TeacherStyleVideoVo> page, TeacherStyleVideoSearch query);

    /***
     * 审核
     * @author liweifan
     * @param: authOperaReq
     * @param: sysUser
     * @updateTime 2022/3/22 20:06
     * @return: com.yonge.cooleshow.common.entity.HttpResponseResult<java.lang.Boolean>
     */
    Boolean doAuth(AuthOperaReq authOperaReq, SysUser sysUser) throws Exception;

    /***
     * 查询用户的风采视频
     * @author liweifan
     * @param: userId
     * @updateTime 2022/3/24 14:34
     * @return: com.yonge.cooleshow.biz.dal.entity.TeacherStyleVideo
     */
    List<TeacherStyleVideo> selectListByUserId(Long userId);
    /***
     * 删除老师风采视频，留下oldIds
     * @author liweifan
     * @param: userId
     * @param: oldIds
     * @updateTime 2022/4/8 15:08
     * @return: java.lang.Integer
     */
    Integer removeByUserIdAndOldIds(Long userId, List<Long> oldIds);
    /***
     * 批量新增老师风采视频
     * @author liweifan
     * @param: createList
     * @updateTime 2022/4/8 15:18
     * @return: java.lang.Integer
     */
    boolean batchAddStyleVideo(List<TeacherStyleVideo> createList);
    /***
     * 老师风采分页查询-学生端
     * @author liweifan
     * @param: page
     * @param: query
     * @updateTime 2022/4/11 15:21
     * @return: com.baomidou.mybatisplus.core.metadata.IPage<com.yonge.cooleshow.biz.dal.vo.TeacherStyleVideoVo>
     */
    IPage<TeacherStyleVideoVo> stylePage(IPage<TeacherStyleVideoVo> page, TeacherStyleSearch query);

    /***
     * 增加视频浏览量
     * @author liweifan
     * @param: videoId
     * @updateTime 2022/4/24 17:37
     * @return: com.yonge.cooleshow.common.entity.HttpResponseResult<com.yonge.cooleshow.biz.dal.vo.TeacherVo>
     */
    HttpResponseResult<Boolean> addVideoBrowse(Long videoId);

}