You've already forked FrameTour-BE
添加"成片"的基础业务接口和实现
This commit is contained in:
@ -0,0 +1,60 @@
|
||||
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);
|
||||
}
|
||||
@ApiOperation("添加成片")
|
||||
@PostMapping("/add")
|
||||
public ApiResponse<Boolean> add(@RequestBody VideoEntity video) {
|
||||
return videoService.add(video);
|
||||
}
|
||||
@ApiOperation("删除成片")
|
||||
@DeleteMapping("/delete/{id}")
|
||||
public ApiResponse<Boolean> deleteById(@PathVariable Long id) {
|
||||
return videoService.deleteById(id);
|
||||
}
|
||||
@ApiOperation("修改成片")
|
||||
@PostMapping("/update")
|
||||
public ApiResponse<Boolean> update(@RequestBody VideoEntity video) {
|
||||
return videoService.update(video);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user