package com.tzld.piaoquan.api.controller;

import com.tzld.piaoquan.api.model.po.contentplatform.VideoGrowthMultiCover;
import com.tzld.piaoquan.api.model.po.contentplatform.VideoGrowthMultiTitle;
import com.tzld.piaoquan.api.service.VideoMultiService;
import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/video/multi")
@Slf4j
public class VideoMultiController {

    @Autowired
    private VideoMultiService videoMultiService;

    @GetMapping("/title/list")
    public CommonResponse<List<VideoGrowthMultiTitle>> getMultiTitleByVideoId(@RequestParam Long videoId) {
        return CommonResponse.success(videoMultiService.getMultiTitleByVideoId(videoId));
    }

    @GetMapping("/cover/list")
    public CommonResponse<List<VideoGrowthMultiCover>> getMultiCoverByVideoId(@RequestParam Long videoId) {
        return CommonResponse.success(videoMultiService.getMultiCoverByVideoId(videoId));
    }
}
