package com.hollywood.applet.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hollywood.applet.dto.PutVideoDto;
import com.hollywood.applet.dto.ReportDto;
import com.hollywood.applet.service.TVideoReportService;
import com.hollywood.applet.service.TVideoService;
import com.hollywood.applet.utils.LoginInfoUtil;
import com.hollywood.common.basic.ApiResult;
import com.hollywood.common.basic.PageInfo;
import com.hollywood.common.model.TInformation;
import com.hollywood.common.model.TShortPlay;
import com.hollywood.common.model.TVideo;
import com.hollywood.common.model.TVideoReport;
import com.hollywood.common.redis.RedisAutoTemplate;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.models.auth.In;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Set;
/**
*
* 短视频管理 前端控制器
*
*
* @author xiaochen
* @since 2024-02-29
*/
@RestController
@RequestMapping("/tVideo")
@Api(tags = "短视频")
public class TVideoController {
@Autowired
private LoginInfoUtil loginInfoUtil;
@Autowired
private RedisAutoTemplate redisAutoTemplate;
@Autowired
private TVideoService videoService;
@Autowired
private TVideoReportService reportService;
@ApiOperation(value = "观看短视频接口")
@PutMapping("/watch")
public ApiResult watch(Long videoId)
{
Long userId = loginInfoUtil.getUserId();
// redisAutoTemplate.addList(userId+":user:history:",videoId);
// Set