package cn.reghao.tnb.content.app.vod.db.mapper;

import cn.reghao.jutil.jdk.web.db.BaseMapper;
import cn.reghao.tnb.content.app.vod.model.po.PlayRecord;
import cn.reghao.tnb.content.api.dto.VideoRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author reghao
 * @date 2023-08-27 13:23:13
 */
@Mapper
public interface PlayRecordMapper extends BaseMapper<PlayRecord> {
    void update(PlayRecord playRecord);

    Double findCurrentTime(@Param("userId") long userId, @Param("videoId") String videoId);
    Long findMaxId(long userId);
    int countUserRecord(long userId);
    List<VideoRecord> findUserRecordByPage1(@Param("pageSize") int pageSize, @Param("nextId") long nextId, @Param("userId") long userId);
    PlayRecord findByUserIdAndVideoId(@Param("userId") long userId, @Param("videoId") String videoId);
}
