package com.mindskip.xzs.controller.admin;
|
|
import com.mindskip.xzs.base.RestResponse;
|
import com.mindskip.xzs.domain.vo.VideoStudentDto;
|
import com.mindskip.xzs.domain.vo.VideoStudentVO;
|
import com.mindskip.xzs.service.IVideoService;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.*;
|
|
import javax.xml.ws.Response;
|
|
@RestController("VideoController")
|
@RequestMapping(value = "/api/admin/video")
|
public class VideoController {
|
|
@Autowired
|
private IVideoService videoService;
|
|
@GetMapping("/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);
|
}
|
}
|