diff --git a/src/main/java/com/teaching/backend/controller/courseResource/CourseResourceController.java b/src/main/java/com/teaching/backend/controller/courseResource/CourseResourceController.java index af7f8ae..4b26e88 100644 --- a/src/main/java/com/teaching/backend/controller/courseResource/CourseResourceController.java +++ b/src/main/java/com/teaching/backend/controller/courseResource/CourseResourceController.java @@ -48,7 +48,19 @@ public class CourseResourceController { */ @DeleteMapping("/delete") public BaseResponse deleteRecords(@RequestParam List ids){ - courseResourcesService.removeCourseResources(ids); +// courseResourcesService.removeCourseResources(ids); + courseResourcesService.removeBatchByIds(ids); return ResultUtils.success("删除成功!!"); } + + /** + * 新增 + * @param courseResources + * @return + */ + @GetMapping("/save") + public BaseResponse saveCourseResource(@RequestBody CourseResources courseResources){ + courseResourcesService.save(courseResources); + return ResultUtils.success("添加成功!"); + } } diff --git a/src/main/java/com/teaching/backend/service/impl/courses/CoursesServiceImpl.java b/src/main/java/com/teaching/backend/service/impl/courses/CoursesServiceImpl.java index 912d839..326939e 100644 --- a/src/main/java/com/teaching/backend/service/impl/courses/CoursesServiceImpl.java +++ b/src/main/java/com/teaching/backend/service/impl/courses/CoursesServiceImpl.java @@ -325,7 +325,7 @@ public class CoursesServiceImpl extends ServiceImpl 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,12 +337,12 @@ public class CoursesServiceImpl extends ServiceImpl impl //查询课程目标 List courseObjectivesTreeVO = objectivesService.queryCourseObjectivesTree(id); - System.out.println("课程目标:"+courseObjectivesTreeVO); +// System.out.println("课程目标:"+courseObjectivesTreeVO); //准备数据 //总目标 StringBuilder overall_goal = new StringBuilder(); for (ObjectiveContents content : courseObjectivesTreeVO.get(0).getContents()) { - overall_goal.append("\r\n").append(content.getContent()); + overall_goal.append("\r\n ").append(content.getContent()); } System.out.println(overall_goal); @@ -358,19 +358,19 @@ public class CoursesServiceImpl extends ServiceImpl impl //知识目标 if (i == 0){ for (ObjectiveContents c : content.getContents()) { - knowledge_goals.append("\r\n").append(c.getContent()); + knowledge_goals.append("\r\n ").append(c.getContent()); } } //思政目标 if (i == 1){ for (ObjectiveContents c : content.getContents()) { - political_goals.append("\r\n").append(c.getContent()); + political_goals.append("\r\n ").append(c.getContent()); } } //价值目标 if (i == 2){ for (ObjectiveContents c : content.getContents()) { - value_goals.append("\r\n").append(c.getContent()); + value_goals.append("\r\n ").append(c.getContent()); } } } diff --git a/src/main/resources/templates/courses.docx b/src/main/resources/templates/courses.docx index 2662b01..c46fc13 100644 Binary files a/src/main/resources/templates/courses.docx and b/src/main/resources/templates/courses.docx differ