|
|
|
@ -33,6 +33,7 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
|
|
|
import org.beetl.sql.core.SqlId;
|
|
|
|
|
import org.beetl.sql.core.engine.PageQuery;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.context.annotation.Lazy;
|
|
|
|
|
import org.springframework.scheduling.annotation.Async;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
@ -71,12 +72,14 @@ public class TeacherOpenCourseMergeCourseInfoService extends CoreBaseService<Tea
|
|
|
|
|
@Autowired
|
|
|
|
|
private TeacherService teacherService;
|
|
|
|
|
@Autowired
|
|
|
|
|
@Lazy
|
|
|
|
|
private TeacherOpenCourseMergeResourcesInfoService teacherOpenCourseMergeResourcesInfoService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private ResourcesInfoService resourcesInfoService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private ResourcesQuestionService resourcesQuestionService;
|
|
|
|
|
@Autowired
|
|
|
|
|
@Lazy
|
|
|
|
|
private TeacherOpenCourseMergeCourseInfoService teacherOpenCourseMergeCourseInfoService;
|
|
|
|
|
|
|
|
|
|
//树结构缓存
|
|
|
|
@ -84,7 +87,7 @@ public class TeacherOpenCourseMergeCourseInfoService extends CoreBaseService<Tea
|
|
|
|
|
private Map<Long,TeacherOpenCourseMergeCourseInfo> TreeCache = new ConcurrentHashMap<>();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 针对 {@link #getTreeById} 的缓存
|
|
|
|
|
* 针对 {@link #getTreeLocalCacheByTeacherOpenCourseId} 的缓存
|
|
|
|
|
*/
|
|
|
|
|
private final LoadingCache<Long, TeacherOpenCourseMergeCourseInfoTree> treeLocalCache
|
|
|
|
|
= CacheUtils.buildAsyncReloadingCache(Duration.ofHours(1L), // 过期时间 1 小时
|
|
|
|
|