You've already forked FrameTour-BE
46 lines
1.4 KiB
Java
46 lines
1.4 KiB
Java
package com.ycwl.basic.controller.pc;
|
|
|
|
import com.github.pagehelper.PageInfo;
|
|
import com.ycwl.basic.model.pc.video.entity.VideoEntity;
|
|
import com.ycwl.basic.model.pc.video.req.VideoReqQuery;
|
|
import com.ycwl.basic.model.pc.video.resp.VideoRespVO;
|
|
import com.ycwl.basic.service.pc.VideoService;
|
|
import com.ycwl.basic.utils.ApiResponse;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import java.util.List;
|
|
|
|
/**
|
|
* @Author:longbinbin
|
|
* @Date:2024/12/3 16:28
|
|
*/
|
|
|
|
@RestController
|
|
@RequestMapping("/api/video/v1")
|
|
@Api(tags = "视频成片管理")
|
|
public class VideoController {
|
|
|
|
@Autowired
|
|
private VideoService videoService;
|
|
|
|
@ApiOperation("分页查询成片")
|
|
@PostMapping("/page")
|
|
public ApiResponse<PageInfo<VideoRespVO>> pageQuery(@RequestBody VideoReqQuery videoReqQuery) {
|
|
return videoService.pageQuery(videoReqQuery);
|
|
}
|
|
@ApiOperation("查询成片列表")
|
|
@PostMapping("/list")
|
|
public ApiResponse<List<VideoRespVO>> list(@RequestBody VideoReqQuery videoReqQuery) {
|
|
return videoService.list(videoReqQuery);
|
|
}
|
|
@ApiOperation("查询成片详情")
|
|
@GetMapping("/getDetail/{id}")
|
|
public ApiResponse<VideoRespVO> getById(@PathVariable Long id) {
|
|
return videoService.getById(id);
|
|
}
|
|
|
|
}
|