|
@@ -1,18 +1,18 @@
|
|
|
package com.ynfy.buss.course.course.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.ynfy.buss.course.course.entity.Course;
|
|
|
import com.ynfy.buss.course.course.mapper.CourseMapper;
|
|
|
import com.ynfy.buss.course.course.service.ICourseService;
|
|
|
-import com.ynfy.buss.course.course.entity.Course;
|
|
|
import com.ynfy.buss.course.coursecatalog.service.ICourseCatalogService;
|
|
|
-import com.ynfy.buss.exam.questionanswer.service.IQuestionAnswerService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
/**
|
|
|
* @Description: course
|
|
|
* @Author: jeecg-boot
|
|
|
- * @Date: 2023-10-24
|
|
|
+ * @Date: 2023-10-24
|
|
|
* @Version: V1.0
|
|
|
*/
|
|
|
@Service
|
|
@@ -22,8 +22,9 @@ public class CourseServiceImpl extends ServiceImpl<CourseMapper, Course> impleme
|
|
|
private ICourseCatalogService courseCatalogService;
|
|
|
|
|
|
@Override
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
public void saveCourse(Course course) {
|
|
|
- this.saveOrUpdate(course);
|
|
|
+ saveOrUpdate(course);
|
|
|
// 保存题目答案选项
|
|
|
courseCatalogService.saveAll(course.getId(), course.getCatalogList());
|
|
|
}
|