package com.mindskip.xzs.controller.teacher;
|
|
import com.mindskip.xzs.base.RestResponse;
|
import com.mindskip.xzs.domain.vo.VideoStudentDto;
|
import com.mindskip.xzs.domain.vo.VideoStudentListVO;
|
import com.mindskip.xzs.domain.vo.VideoStudentVO;
|
import com.mindskip.xzs.service.IMyVideoService;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.*;
|
|
import java.util.List;
|
|
@RestController
|
@RequestMapping(value = "/api/teacher/video")
|
public class MyVideoController {
|
|
@Autowired
|
private IMyVideoService videoService;
|
|
@PostMapping("/clear")
|
public RestResponse clear(){
|
videoService.clear();
|
return RestResponse.ok();
|
}
|
|
@PostMapping("/add")
|
public RestResponse add(@RequestBody VideoStudentDto videoStudentDto){
|
videoService.save(videoStudentDto);
|
return RestResponse.ok();
|
}
|
|
@GetMapping("/showButton/{id}")
|
public RestResponse showButton(@PathVariable Integer id){
|
VideoStudentVO videoStudentVO = videoService.showButton(id);
|
return RestResponse.ok(videoStudentVO);
|
}
|
|
@GetMapping("/getList")
|
public RestResponse getList(){
|
List<VideoStudentListVO> res = videoService.getStudentVideoList();
|
return RestResponse.ok(res);
|
}
|
}
|