init
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package com.backend.webbackend.Controller;
|
||||
|
||||
import com.backend.webbackend.Service.courseService;
|
||||
import com.backend.webbackend.Vo.ResultVo;
|
||||
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.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("course")
|
||||
public class CourseController {
|
||||
@Autowired
|
||||
private courseService courseService;
|
||||
|
||||
// 返回课程信息
|
||||
@GetMapping("getAll")
|
||||
public ResultVo getAllCourses() {
|
||||
return ResultVo.Success("",courseService.getAllCourseInfo());
|
||||
}
|
||||
|
||||
//返回课程资源
|
||||
@GetMapping("getResources")
|
||||
public ResultVo getCourseResources() {
|
||||
return ResultVo.Success("", courseService.getCourseResources());
|
||||
}
|
||||
|
||||
//用户上传课程资源
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user