|
@@ -1,6 +1,18 @@
|
|
|
package cn.com.qmth.examcloud.support.cache;
|
|
|
|
|
|
-import cn.com.qmth.examcloud.support.cache.bean.*;
|
|
|
+import cn.com.qmth.examcloud.support.cache.bean.AppCacheBean;
|
|
|
+import cn.com.qmth.examcloud.support.cache.bean.BasePaperCacheBean;
|
|
|
+import cn.com.qmth.examcloud.support.cache.bean.CourseCacheBean;
|
|
|
+import cn.com.qmth.examcloud.support.cache.bean.ExamOrgPropertyCacheBean;
|
|
|
+import cn.com.qmth.examcloud.support.cache.bean.ExamOrgSettingsCacheBean;
|
|
|
+import cn.com.qmth.examcloud.support.cache.bean.ExamRecordPropertyCacheBean;
|
|
|
+import cn.com.qmth.examcloud.support.cache.bean.ExamSettingsCacheBean;
|
|
|
+import cn.com.qmth.examcloud.support.cache.bean.PrivilegeRolesCacheBean;
|
|
|
+import cn.com.qmth.examcloud.support.cache.bean.QuestionCacheBean;
|
|
|
+import cn.com.qmth.examcloud.support.cache.bean.RootOrgPrivilegesCacheBean;
|
|
|
+import cn.com.qmth.examcloud.support.cache.bean.SmsAssemblyCacheBean;
|
|
|
+import cn.com.qmth.examcloud.support.cache.bean.StudentCacheBean;
|
|
|
+import cn.com.qmth.examcloud.support.cache.bean.SysPropertyCacheBean;
|
|
|
import cn.com.qmth.examcloud.web.cache.ObjectRedisCacheProcessor;
|
|
|
|
|
|
/**
|
|
@@ -90,32 +102,34 @@ public class CacheHelper {
|
|
|
"cn.com.qmth.examcloud.core.basic.service.cache.RootOrgPrrivilegesCache");
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 获取试卷结构(题库)
|
|
|
- *
|
|
|
- * @param paperId
|
|
|
- * @return
|
|
|
- */
|
|
|
- public static BasePaperCacheBean getBasePaper(String paperId) {
|
|
|
- return ObjectRedisCacheProcessor.get("Q_PAPER:BASE_", new Object[]{paperId},
|
|
|
- BasePaperCacheBean.class, "EC-CORE-QUESTION",
|
|
|
- "cn.com.qmth.examcloud.core.questions.service.cache.BasePaperCache");
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 获取试题(题库)
|
|
|
- *
|
|
|
- * @param examId
|
|
|
- * @param courseCode
|
|
|
- * @param groupCode
|
|
|
- * @param questionId
|
|
|
- * @return
|
|
|
- */
|
|
|
- public static QuestionCacheBean getQuestion(Long examId, String courseCode, String groupCode, String questionId) {
|
|
|
- return ObjectRedisCacheProcessor.get("Q_QUESTION:", new Object[]{examId, courseCode, groupCode, questionId},
|
|
|
- QuestionCacheBean.class, "EC-CORE-QUESTION",
|
|
|
- "cn.com.qmth.examcloud.core.questions.service.cache.QuestionCache");
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 获取试卷结构(题库)
|
|
|
+ *
|
|
|
+ * @param paperId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public static BasePaperCacheBean getBasePaper(String paperId) {
|
|
|
+ return ObjectRedisCacheProcessor.get("Q_PAPER:BASE_", new Object[]{paperId},
|
|
|
+ BasePaperCacheBean.class, "EC-CORE-QUESTION",
|
|
|
+ "cn.com.qmth.examcloud.core.questions.service.cache.BasePaperCache");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取试题(题库)
|
|
|
+ *
|
|
|
+ * @param examId
|
|
|
+ * @param courseCode
|
|
|
+ * @param groupCode
|
|
|
+ * @param questionId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public static QuestionCacheBean getQuestion(Long examId, String courseCode, String groupCode,
|
|
|
+ String questionId) {
|
|
|
+ return ObjectRedisCacheProcessor.get("Q_QUESTION:",
|
|
|
+ new Object[]{examId, courseCode, groupCode, questionId}, QuestionCacheBean.class,
|
|
|
+ "EC-CORE-QUESTION",
|
|
|
+ "cn.com.qmth.examcloud.core.questions.service.cache.QuestionCache");
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 查询课程
|
|
@@ -186,4 +200,17 @@ public class CacheHelper {
|
|
|
"cn.com.qmth.examcloud.core.examwork.service.cache.ExamSettingsCache");
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 查询课程
|
|
|
+ *
|
|
|
+ * @author WANGWEI
|
|
|
+ * @param courseId
|
|
|
+ * @param rootOrgId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public static CourseCacheBean getOrg(Long orgId) {
|
|
|
+ return ObjectRedisCacheProcessor.get("B_ORG:", new Object[]{orgId}, CourseCacheBean.class,
|
|
|
+ "EC-CORE-BASIC", "cn.com.qmth.examcloud.core.basic.service.cache.OrgCache");
|
|
|
+ }
|
|
|
+
|
|
|
}
|