1
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
package com.peanut.modules.master.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.peanut.common.utils.R;
|
||||
import com.peanut.modules.common.dao.CourseDao;
|
||||
import com.peanut.modules.common.entity.CourseEntity;
|
||||
import com.peanut.modules.common.entity.CourseSociologyEntity;
|
||||
import com.peanut.modules.common.entity.CourseToSociologyEntity;
|
||||
import com.peanut.modules.common.to.ParamTo;
|
||||
import com.peanut.modules.master.service.CourseService;
|
||||
import com.peanut.modules.master.service.CourseSociologyService;
|
||||
@@ -12,7 +13,6 @@ 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.List;
|
||||
@@ -57,4 +57,21 @@ public class CourseSociologyController {
|
||||
return R.ok().put("courseList",courseListForSociology);
|
||||
}
|
||||
|
||||
@RequestMapping("/getCourseListCanSociology")
|
||||
public R getCourseListCanSociology(@RequestBody ParamTo param){
|
||||
Page courseListCanSociology = courseService.getCourseListCanSociology(param);
|
||||
return R.ok().put("page",courseListCanSociology);
|
||||
}
|
||||
|
||||
@RequestMapping("/bindCourseAndSociology")
|
||||
public R bindCourseAndSociology(@RequestBody CourseToSociologyEntity courseToSociologyEntity){
|
||||
return courseToSociologyService.bindCourseAndSociology(courseToSociologyEntity);
|
||||
}
|
||||
|
||||
@RequestMapping("/unbindCourseAndSociology")
|
||||
public R unbindCourseAndSociology(@RequestBody CourseToSociologyEntity courseToSociologyEntity){
|
||||
courseToSociologyService.removeById(courseToSociologyEntity.getId());
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user