添加课程同步添加一个总目标的内容

master
Alan 3 months ago
parent f77dd37ce3
commit 5390751e57
  1. 6
      src/main/java/com/teaching/backend/service/impl/courses/CoursesServiceImpl.java

@ -164,6 +164,12 @@ public class CoursesServiceImpl extends ServiceImpl<CoursesMapper, Courses> impl
courseObjectivesMapper.updateById(courseTotalObjectives); courseObjectivesMapper.updateById(courseTotalObjectives);
} }
// 在总目标里面插入一个内容
ObjectiveContents objectiveContents = new ObjectiveContents();
objectiveContents.setObjectiveId(courseTotalObjectivesId);
objectiveContents.setContent("课程总目标");
objectiveContentsMapper.insert(objectiveContents);
return "添加成功"; return "添加成功";
} }

Loading…
Cancel
Save