课程资源添加

master
wenyu441069198 7 months ago
parent 2cd9bbe1d7
commit 0d4ec1803b
  1. 14
      src/main/java/com/teaching/backend/controller/courseResource/CourseResourceController.java
  2. 4
      src/main/java/com/teaching/backend/service/impl/courses/CoursesServiceImpl.java
  3. BIN
      src/main/resources/templates/courses.docx

@ -48,7 +48,19 @@ public class CourseResourceController {
*/
@DeleteMapping("/delete")
public BaseResponse<String> deleteRecords(@RequestParam List<Long> ids){
courseResourcesService.removeCourseResources(ids);
// courseResourcesService.removeCourseResources(ids);
courseResourcesService.removeBatchByIds(ids);
return ResultUtils.success("删除成功!!");
}
/**
* 新增
* @param courseResources
* @return
*/
@GetMapping("/save")
public BaseResponse<String> saveCourseResource(@RequestBody CourseResources courseResources){
courseResourcesService.save(courseResources);
return ResultUtils.success("添加成功!");
}
}

@ -325,7 +325,7 @@ public class CoursesServiceImpl extends ServiceImpl<CoursesMapper, Courses> impl
//准备导出数据
//查询课程通过课程id查--课程简介
Courses courses = this.getById(id);
System.out.println("课程:"+courses);
// System.out.println("课程:"+courses);
//准备数据
String course_name = courses.getName();
String course_code = courses.getCode();
@ -337,7 +337,7 @@ public class CoursesServiceImpl extends ServiceImpl<CoursesMapper, Courses> impl
//查询课程目标
List<CourseObjectivesTreeVO> courseObjectivesTreeVO = objectivesService.queryCourseObjectivesTree(id);
System.out.println("课程目标:"+courseObjectivesTreeVO);
// System.out.println("课程目标:"+courseObjectivesTreeVO);
//准备数据
//总目标
StringBuilder overall_goal = new StringBuilder();

Loading…
Cancel
Save