班级管理
This commit is contained in:
@@ -233,18 +233,6 @@ public class CourseController {
|
||||
return courseService.getCourseLableLinkList(param);
|
||||
}
|
||||
|
||||
//查询课程主任
|
||||
@RequestMapping("/getCourseDirector")
|
||||
public R getCourseDirector(@RequestBody Map<String,Object> param){
|
||||
return courseService.getCourseDirector(param);
|
||||
}
|
||||
|
||||
//编辑课程主任
|
||||
@RequestMapping("/editCourseDirector")
|
||||
public R editCourseDirector(@RequestBody Map<String,Object> param){
|
||||
return courseService.editCourseDirector(param);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -31,10 +31,6 @@ public interface CourseService extends IService<CourseEntity> {
|
||||
|
||||
R getCourseLableLinkList(Map<String,Object> param);
|
||||
|
||||
R getCourseDirector(Map<String,Object> param);
|
||||
|
||||
R editCourseDirector(Map<String,Object> param);
|
||||
|
||||
Page<ShopProduct> getProductListForCourse(Map<String,Object> param);
|
||||
|
||||
List<CourseCatalogueEntity> catalogueListByCourse(Map<String, Object> params);
|
||||
|
||||
@@ -282,36 +282,6 @@ public class CourseServiceImpl extends ServiceImpl<CourseDao, CourseEntity> impl
|
||||
return R.ok().put("resList",resList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R getCourseDirector(Map<String, Object> param) {
|
||||
CourseEntity course = this.getById((Integer)param.get("courseId"));
|
||||
MyUserEntity director = userDao.selectById(course.getDirector());
|
||||
MyUserEntity ddirector = userDao.selectById(course.getDdirector());
|
||||
return R.ok().put("director",director).put("ddirector",ddirector);
|
||||
}
|
||||
|
||||
@Override
|
||||
public R editCourseDirector(Map<String, Object> param) {
|
||||
int director = (Integer)param.get("director");
|
||||
int ddirector = (Integer)param.get("ddirector");
|
||||
if ((director==0&&ddirector==0)||director!=ddirector){
|
||||
CourseEntity course = this.getById((Integer)param.get("courseId"));
|
||||
if (course != null) {
|
||||
course.setDirector(director);
|
||||
course.setDdirector(ddirector);
|
||||
if (this.saveOrUpdate(course)){
|
||||
return R.ok();
|
||||
}else {
|
||||
return R.error("编辑失败!");
|
||||
}
|
||||
}else {
|
||||
return R.error("未查询到课程!");
|
||||
}
|
||||
}else {
|
||||
return R.error("不能是同一人!");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<ShopProduct> getProductListForCourse(Map<String, Object> param) {
|
||||
Integer limit = Integer.valueOf(param.get("limit").toString());
|
||||
|
||||
Reference in New Issue
Block a user