1
This commit is contained in:
@@ -8,6 +8,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Map;
|
||||
@@ -25,4 +26,24 @@ public class CourseController {
|
||||
Page courseList = courseService.getCourseList(map);
|
||||
return R.ok().put("page",courseList);
|
||||
}
|
||||
|
||||
@RequestMapping("/addCourse")
|
||||
public R addCourse(@RequestBody CourseEntity course){
|
||||
courseService.save(course);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@RequestMapping("/delCourse")
|
||||
public R delCourse(int id){
|
||||
return courseService.delCourse(id);
|
||||
}
|
||||
|
||||
@RequestMapping("/editCourse")
|
||||
public R editCourse(@RequestBody CourseEntity course){
|
||||
courseService.updateById(course);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user