|
|
|
@ -74,6 +74,7 @@ public class CourseInfoService extends CoreBaseService<CourseInfo>{
|
|
|
|
|
|
|
|
|
|
@Autowired private ResourcesApplicationCourseDao resourcesApplicationCourseDao;
|
|
|
|
|
@Autowired private CoreUserService coreUserService;
|
|
|
|
|
@Autowired private CourseLabelService courseLabelService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final List<Future<Boolean>> results = new ArrayList<>();
|
|
|
|
@ -211,9 +212,13 @@ public class CourseInfoService extends CoreBaseService<CourseInfo>{
|
|
|
|
|
|
|
|
|
|
CourseInfo courseInfo = courseInfoDao.single(courseInfoQuery.getCourseInfoId());
|
|
|
|
|
|
|
|
|
|
// 不管有没有绑定应用,都先删除
|
|
|
|
|
deleteByCourseInfoId(courseInfo.getCourseInfoId());
|
|
|
|
|
|
|
|
|
|
if(StringUtils.isNotBlank(courseInfoQuery.getResourcesApplicationIds())){
|
|
|
|
|
//删除以前的
|
|
|
|
|
deleteByCourseInfoId(courseInfo.getCourseInfoId());
|
|
|
|
|
|
|
|
|
|
CourseLabel courseLabel = courseLabelService.queryById(courseInfo.getCourseLabelId());
|
|
|
|
|
Assert.isTrue(courseLabel != null && "应用课程类".equals(courseLabel.getCourseLabelType()), "只有应用课程类的课程,才能绑定应用!");
|
|
|
|
|
|
|
|
|
|
List<ResourcesApplicationCourse> resourcesApplicationCourseList = new ArrayList<>();
|
|
|
|
|
String[] resourcesApplicationIds = courseInfoQuery.getResourcesApplicationIds().split(",");
|
|
|
|
|