|
|
|
@ -16,14 +16,12 @@ import com.ibeetl.admin.core.service.CorePlatformService;
|
|
|
|
|
import com.ibeetl.admin.core.service.CoreUserService;
|
|
|
|
|
import com.ibeetl.admin.core.util.PlatformException;
|
|
|
|
|
import com.ibeetl.admin.core.web.JsonResult;
|
|
|
|
|
import com.ibeetl.jlw.dao.CourseInfoDao;
|
|
|
|
|
import com.ibeetl.jlw.dao.ResourcesApplicationCourseDao;
|
|
|
|
|
import com.ibeetl.jlw.dao.ResourcesInfoDao;
|
|
|
|
|
import com.ibeetl.jlw.dao.TeacherOpenCourseMergeCourseInfoDao;
|
|
|
|
|
import com.ibeetl.jlw.dao.*;
|
|
|
|
|
import com.ibeetl.jlw.entity.*;
|
|
|
|
|
import com.ibeetl.jlw.enums.MoveEnum;
|
|
|
|
|
import com.ibeetl.jlw.web.query.CourseInfoQuery;
|
|
|
|
|
import com.ibeetl.jlw.web.query.ResourcesInfoQuery;
|
|
|
|
|
import com.ibeetl.jlw.web.query.UniversitiesCollegesJurisdictionCurriculumResourcesQuery;
|
|
|
|
|
import lombok.Data;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
@ -91,6 +89,9 @@ public class CourseInfoService extends CoreBaseService<CourseInfo> {
|
|
|
|
|
@Autowired
|
|
|
|
|
private CourseLabelService courseLabelService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private UniversitiesCollegesJurisdictionCurriculumResourcesDao universitiesCollegesJurisdictionCurriculumResourcesDao;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final List<Future<Boolean>> results = new ArrayList<>();
|
|
|
|
|
|
|
|
|
@ -116,7 +117,7 @@ public class CourseInfoService extends CoreBaseService<CourseInfo> {
|
|
|
|
|
courseInfoId = c.getCourseInfoParentId();
|
|
|
|
|
for (int j = 0; j < 25; j++) {
|
|
|
|
|
CourseInfo courseInfoParent = queryById(courseInfoId);
|
|
|
|
|
if (courseInfoParent == null){
|
|
|
|
|
if (courseInfoParent == null) {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if (((Integer) 1).equals(courseInfoParent.getCourseInfoType())) {
|
|
|
|
@ -1644,4 +1645,25 @@ public class CourseInfoService extends CoreBaseService<CourseInfo> {
|
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 判断授权课程是否再使用
|
|
|
|
|
*/
|
|
|
|
|
public boolean getSystemCourseUse(Long courseInfoId) {
|
|
|
|
|
if (ObjectUtil.isEmpty(courseInfoId)) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
List<UniversitiesCollegesJurisdictionCurriculumResources> allByQuery = universitiesCollegesJurisdictionCurriculumResourcesDao.getSQLManager().lambdaQuery(UniversitiesCollegesJurisdictionCurriculumResources.class)
|
|
|
|
|
.andEq(UniversitiesCollegesJurisdictionCurriculumResources::getCourseInfoId, courseInfoId)
|
|
|
|
|
.select();
|
|
|
|
|
if (CollectionUtil.isEmpty(allByQuery)) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
for (UniversitiesCollegesJurisdictionCurriculumResources resources : allByQuery) {
|
|
|
|
|
if (resources.getUseEndTime().getTime() > new Date().getTime() && !ObjectUtil.equals(resources.getUseType(), 0)) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|