|
@@ -1,5 +1,6 @@
|
|
|
package cn.com.qmth.examcloud.support.cache;
|
|
|
|
|
|
+import cn.com.qmth.examcloud.support.CacheConstants;
|
|
|
import cn.com.qmth.examcloud.support.cache.bean.*;
|
|
|
import cn.com.qmth.examcloud.web.cache.HashRedisCacheProcessor;
|
|
|
import cn.com.qmth.examcloud.web.cache.ObjectRedisCacheProcessor;
|
|
@@ -9,359 +10,347 @@ import cn.com.qmth.examcloud.web.cache.ObjectRedisCacheProcessor;
|
|
|
*
|
|
|
* @author WANGWEI
|
|
|
* @date 2019年5月9日
|
|
|
- * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
|
|
|
*/
|
|
|
-public class CacheHelper {
|
|
|
+public class CacheHelper implements CacheConstants {
|
|
|
|
|
|
- /**
|
|
|
- * 获取APP
|
|
|
- *
|
|
|
- * @param appId
|
|
|
- * @return
|
|
|
- * @author WANGWEI
|
|
|
- */
|
|
|
- public static AppCacheBean getApp(Long appId) {
|
|
|
- return ObjectRedisCacheProcessor.get("$_APP:", new Object[]{appId}, AppCacheBean.class);
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 获取APP
|
|
|
+ *
|
|
|
+ * @param appId
|
|
|
+ * @return
|
|
|
+ * @author WANGWEI
|
|
|
+ */
|
|
|
+ public static AppCacheBean getApp(Long appId) {
|
|
|
+ return ObjectRedisCacheProcessor.get(CACHE_B_APP, new Object[]{appId}, AppCacheBean.class);
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 获取系统属性<br>
|
|
|
- *
|
|
|
- * @param propKey
|
|
|
- * @return
|
|
|
- * @author WANGWEI
|
|
|
- */
|
|
|
- public static SysPropertyCacheBean getSysProperty(String propKey) {
|
|
|
- return ObjectRedisCacheProcessor.get("$_SYS_PROP:", new Object[]{propKey},
|
|
|
- SysPropertyCacheBean.class, "EC-CORE-BASIC",
|
|
|
- "cn.com.qmth.examcloud.core.basic.service.cache.SystemPropertyCache");
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 获取系统属性<br>
|
|
|
+ *
|
|
|
+ * @param propKey
|
|
|
+ * @return
|
|
|
+ * @author WANGWEI
|
|
|
+ */
|
|
|
+ public static SysPropertyCacheBean getSysProperty(String propKey) {
|
|
|
+ return ObjectRedisCacheProcessor.get(CACHE_B_SYS_PROP, new Object[]{propKey},
|
|
|
+ SysPropertyCacheBean.class, "EC-CORE-BASIC",
|
|
|
+ "cn.com.qmth.examcloud.core.basic.service.cache.SystemPropertyCache");
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 根据考试记录id获取考试信息<br>
|
|
|
- *
|
|
|
- * @param examRecordDataId
|
|
|
- * @return
|
|
|
- * @author WANGWEI
|
|
|
- */
|
|
|
- public static ExamRecordPropertyCacheBean getExamRecordProperty(Long examRecordDataId) {
|
|
|
- return ObjectRedisCacheProcessor.get("OE_EXAM_RECORD_PROP:", new Object[]{examRecordDataId},
|
|
|
- ExamRecordPropertyCacheBean.class, "EC-CORE-OE-STUDENT",
|
|
|
- "cn.com.qmth.examcloud.core.oe.common.cache.ExamRecordPropertyCache");
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 根据短信配置代码获取短信配置详情
|
|
|
+ *
|
|
|
+ * @param smsAssemblyCode 短信配置代码
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public static SmsAssemblyCacheBean getSmsAssembly(String smsAssemblyCode) {
|
|
|
+ return ObjectRedisCacheProcessor.get(CACHE_B_SMS_PROP, new Object[]{smsAssemblyCode},
|
|
|
+ SmsAssemblyCacheBean.class, "EC-CORE-BASIC",
|
|
|
+ "cn.com.qmth.examcloud.core.basic.service.cache.SmsAssemblyCache");
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 根据短信配置代码获取短信配置详情
|
|
|
- *
|
|
|
- * @param smsAssemblyCode
|
|
|
- * 短信配置代码
|
|
|
- * @return
|
|
|
- */
|
|
|
- public static SmsAssemblyCacheBean getSmsAssembly(String smsAssemblyCode) {
|
|
|
- return ObjectRedisCacheProcessor.get("B_SMS_ASSEMBLY_PROP:", new Object[]{smsAssemblyCode},
|
|
|
- SmsAssemblyCacheBean.class, "EC-CORE-BASIC",
|
|
|
- "cn.com.qmth.examcloud.core.basic.service.cache.SmsAssemblyCache");
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 获取权限关联的角色集合
|
|
|
+ *
|
|
|
+ * @param rootOrgId
|
|
|
+ * @param privilegeCode
|
|
|
+ * @return
|
|
|
+ * @author WANGWEI
|
|
|
+ */
|
|
|
+ public static PrivilegeRolesCacheBean getPrivilegeRoles(Long rootOrgId, String privilegeCode) {
|
|
|
+ return ObjectRedisCacheProcessor.get(CACHE_B_PRIVILEGE_ROLES,
|
|
|
+ new Object[]{rootOrgId, privilegeCode}, PrivilegeRolesCacheBean.class,
|
|
|
+ "EC-CORE-BASIC",
|
|
|
+ "cn.com.qmth.examcloud.core.basic.service.cache.PrrivilegeRolesCache");
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 获取权限关联的角色集合
|
|
|
- *
|
|
|
- * @param rootOrgId
|
|
|
- * @param privilegeCode
|
|
|
- * @return
|
|
|
- * @author WANGWEI
|
|
|
- */
|
|
|
- public static PrivilegeRolesCacheBean getPrivilegeRoles(Long rootOrgId, String privilegeCode) {
|
|
|
- return ObjectRedisCacheProcessor.get("$_PRIV_ROLES:",
|
|
|
- new Object[]{rootOrgId, privilegeCode}, PrivilegeRolesCacheBean.class,
|
|
|
- "EC-CORE-BASIC",
|
|
|
- "cn.com.qmth.examcloud.core.basic.service.cache.PrrivilegeRolesCache");
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 获取顶级机构关联的角色集合
|
|
|
+ *
|
|
|
+ * @param rootOrgId
|
|
|
+ * @return
|
|
|
+ * @author WANGWEI
|
|
|
+ */
|
|
|
+ public static RootOrgPrivilegesCacheBean getRootOrgPrivileges(Long rootOrgId) {
|
|
|
+ return ObjectRedisCacheProcessor.get(CACHE_B_ORG_PRIVILEGE, new Object[]{rootOrgId},
|
|
|
+ PrivilegeRolesCacheBean.class, "EC-CORE-BASIC",
|
|
|
+ "cn.com.qmth.examcloud.core.basic.service.cache.RootOrgPrrivilegesCache");
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 获取顶级机构关联的角色集合
|
|
|
- *
|
|
|
- * @param rootOrgId
|
|
|
- * @return
|
|
|
- * @author WANGWEI
|
|
|
- */
|
|
|
- public static RootOrgPrivilegesCacheBean getRootOrgPrivileges(Long rootOrgId) {
|
|
|
- return ObjectRedisCacheProcessor.get("B_ROOT_ORG_PRIVS:", new Object[]{rootOrgId},
|
|
|
- PrivilegeRolesCacheBean.class, "EC-CORE-BASIC",
|
|
|
- "cn.com.qmth.examcloud.core.basic.service.cache.RootOrgPrrivilegesCache");
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 获取调卷规则信息(题库)
|
|
|
+ *
|
|
|
+ * @param examId
|
|
|
+ * @param courseCode
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public static ExtractConfigCacheBean getExtractConfig(Long examId, String courseCode) {
|
|
|
+ return ObjectRedisCacheProcessor.get(CACHE_Q_EXTRACT_CONFIG, new Object[]{examId, courseCode},
|
|
|
+ ExtractConfigCacheBean.class, "EC-CORE-QUESTION",
|
|
|
+ "cn.com.qmth.examcloud.core.questions.service.cache.ExtractConfigCache");
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 获取调卷规则信息(题库)
|
|
|
- *
|
|
|
- * @param examId
|
|
|
- * @param courseCode
|
|
|
- * @return
|
|
|
- */
|
|
|
- public static ExtractConfigCacheBean getExtractConfig(Long examId, String courseCode) {
|
|
|
- return ObjectRedisCacheProcessor.get("Q_EXTRACT_CONFIG:", new Object[]{examId, courseCode},
|
|
|
- ExtractConfigCacheBean.class, "EC-CORE-QUESTION",
|
|
|
- "cn.com.qmth.examcloud.core.questions.service.cache.ExtractConfigCache");
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 获取调卷规则调取的试卷结构(题库)
|
|
|
+ *
|
|
|
+ * @param examId
|
|
|
+ * @param courseCode
|
|
|
+ * @param groupCode
|
|
|
+ * @param paperId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public static ExtractConfigPaperCacheBean getExtractConfigPaper(Long examId, String courseCode,
|
|
|
+ String groupCode, String paperId) {
|
|
|
+ return HashRedisCacheProcessor.get(CACHE_Q_EXTRACT_CONFIG_PAPER,
|
|
|
+ new Object[]{paperId}, new Object[]{examId, courseCode, groupCode},
|
|
|
+ ExtractConfigPaperCacheBean.class, "EC-CORE-QUESTION",
|
|
|
+ "cn.com.qmth.examcloud.core.questions.service.cache.ExtractConfigPaperCache");
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 获取调卷规则调取的试卷结构(题库)
|
|
|
- *
|
|
|
- * @param examId
|
|
|
- * @param courseCode
|
|
|
- * @param groupCode
|
|
|
- * @param paperId
|
|
|
- * @return
|
|
|
- */
|
|
|
- public static ExtractConfigPaperCacheBean getExtractConfigPaper(Long examId, String courseCode,
|
|
|
- String groupCode, String paperId) {
|
|
|
- return HashRedisCacheProcessor.get("Q_PAPER:EXTRACT_CONFIG_PAPER_",
|
|
|
- new Object[]{paperId},new Object[]{examId, courseCode, groupCode},
|
|
|
- ExtractConfigPaperCacheBean.class, "EC-CORE-QUESTION",
|
|
|
- "cn.com.qmth.examcloud.core.questions.service.cache.ExtractConfigPaperCache");
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 获取试卷结构(题库)
|
|
|
+ *
|
|
|
+ * @param paperId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public static BasePaperCacheBean getBasePaper(String paperId) {
|
|
|
+ return ObjectRedisCacheProcessor.get(CACHE_Q_BASE_PAPER, new Object[]{paperId},
|
|
|
+ BasePaperCacheBean.class, "EC-CORE-QUESTION",
|
|
|
+ "cn.com.qmth.examcloud.core.questions.service.cache.BasePaperCache");
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 获取试卷结构(题库)
|
|
|
- *
|
|
|
- * @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 HashRedisCacheProcessor.get(CACHE_Q_QUESTION,
|
|
|
+ new Object[]{questionId}, new Object[]{examId, courseCode, groupCode}, QuestionCacheBean.class,
|
|
|
+ "EC-CORE-QUESTION",
|
|
|
+ "cn.com.qmth.examcloud.core.questions.service.cache.QuestionCache");
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 获取试题(题库)
|
|
|
- *
|
|
|
- * @param examId
|
|
|
- * @param courseCode
|
|
|
- * @param groupCode
|
|
|
- * @param questionId
|
|
|
- * @return
|
|
|
- */
|
|
|
- public static QuestionCacheBean getQuestion(Long examId, String courseCode, String groupCode,
|
|
|
- String questionId) {
|
|
|
- return HashRedisCacheProcessor.get("Q_QUESTION:",
|
|
|
- new Object[]{questionId},new Object[]{examId, courseCode, groupCode}, QuestionCacheBean.class,
|
|
|
- "EC-CORE-QUESTION",
|
|
|
- "cn.com.qmth.examcloud.core.questions.service.cache.QuestionCache");
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 获取试题答案(题库)
|
|
|
+ *
|
|
|
+ * @param questionId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public static QuestionAnswerCacheBean getQuestionAnswer(String questionId) {
|
|
|
+ return ObjectRedisCacheProcessor.get(CACHE_Q_QUESTION_ANSWER, new Object[]{questionId},
|
|
|
+ QuestionAnswerCacheBean.class, "EC-CORE-QUESTION",
|
|
|
+ "cn.com.qmth.examcloud.core.questions.service.cache.QuestionAnswerCache");
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 获取试题答案(题库)
|
|
|
- *
|
|
|
- * @param questionId
|
|
|
- * @return
|
|
|
- */
|
|
|
- public static QuestionAnswerCacheBean getQuestionAnswer(String questionId) {
|
|
|
- return ObjectRedisCacheProcessor.get("Q_QUESTION:ANSWER_", new Object[]{questionId},
|
|
|
- QuestionAnswerCacheBean.class, "EC-CORE-QUESTION",
|
|
|
- "cn.com.qmth.examcloud.core.questions.service.cache.QuestionAnswerCache");
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 查询课程
|
|
|
+ *
|
|
|
+ * @param courseId
|
|
|
+ * @return
|
|
|
+ * @author WANGWEI
|
|
|
+ */
|
|
|
+ public static CourseCacheBean getCourse(Long courseId) {
|
|
|
+ return ObjectRedisCacheProcessor.get("B_COURSE:", new Object[]{courseId},
|
|
|
+ CourseCacheBean.class, "EC-CORE-BASIC",
|
|
|
+ "cn.com.qmth.examcloud.core.basic.service.cache.CourseCache");
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 查询课程
|
|
|
- *
|
|
|
- * @param courseId
|
|
|
- * @return
|
|
|
- * @author WANGWEI
|
|
|
- */
|
|
|
- public static CourseCacheBean getCourse(Long courseId) {
|
|
|
- return ObjectRedisCacheProcessor.get("B_COURSE:", new Object[]{courseId},
|
|
|
- CourseCacheBean.class, "EC-CORE-BASIC",
|
|
|
- "cn.com.qmth.examcloud.core.basic.service.cache.CourseCache");
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 查询学生
|
|
|
+ *
|
|
|
+ * @param studentId
|
|
|
+ * @return
|
|
|
+ * @author WANGWEI
|
|
|
+ */
|
|
|
+ public static StudentCacheBean getStudent(Long studentId) {
|
|
|
+ return ObjectRedisCacheProcessor.get("B_STUDENT:", new Object[]{studentId},
|
|
|
+ StudentCacheBean.class, "EC-CORE-BASIC",
|
|
|
+ "cn.com.qmth.examcloud.core.basic.service.cache.StudentCache");
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 查询学生
|
|
|
- *
|
|
|
- * @param studentId
|
|
|
- * @return
|
|
|
- * @author WANGWEI
|
|
|
- */
|
|
|
- public static StudentCacheBean getStudent(Long studentId) {
|
|
|
- return ObjectRedisCacheProcessor.get("B_STUDENT:", new Object[]{studentId},
|
|
|
- StudentCacheBean.class, "EC-CORE-BASIC",
|
|
|
- "cn.com.qmth.examcloud.core.basic.service.cache.StudentCache");
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 查询考试学生配置
|
|
|
+ *
|
|
|
+ * @param examId
|
|
|
+ * @param studentId
|
|
|
+ * @return
|
|
|
+ * @author WANGWEI
|
|
|
+ */
|
|
|
+ public static ExamStudentSettingsCacheBean getExamStudentSettings(Long examId, Long studentId) {
|
|
|
+ return ObjectRedisCacheProcessor.get("E_EXAM_STUDENT_SETTINGS:",
|
|
|
+ new Object[]{examId, studentId}, ExamStudentSettingsCacheBean.class,
|
|
|
+ "EC-CORE-EXAMWORK",
|
|
|
+ "cn.com.qmth.examcloud.core.examwork.service.cache.ExamStudentSettingsCache");
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 查询考试学生配置
|
|
|
- *
|
|
|
- * @param examId
|
|
|
- * @param studentId
|
|
|
- * @return
|
|
|
- * @author WANGWEI
|
|
|
- */
|
|
|
- public static ExamStudentSettingsCacheBean getExamStudentSettings(Long examId, Long studentId) {
|
|
|
- return ObjectRedisCacheProcessor.get("E_EXAM_STUDENT_SETTINGS:",
|
|
|
- new Object[]{examId, studentId}, ExamStudentSettingsCacheBean.class,
|
|
|
- "EC-CORE-EXAMWORK",
|
|
|
- "cn.com.qmth.examcloud.core.examwork.service.cache.ExamStudentSettingsCache");
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 查询考试学生属性
|
|
|
+ *
|
|
|
+ * @param examId
|
|
|
+ * @param studentId
|
|
|
+ * @param key
|
|
|
+ * @return
|
|
|
+ * @author WANGWEI
|
|
|
+ */
|
|
|
+ public static ExamStudentPropertyCacheBean getExamStudentProperty(Long examId, Long studentId,
|
|
|
+ String key) {
|
|
|
+ return ObjectRedisCacheProcessor.get("E_EXAM_STUDENT_PROP:",
|
|
|
+ new Object[]{examId, studentId, key}, ExamStudentPropertyCacheBean.class,
|
|
|
+ "EC-CORE-EXAMWORK",
|
|
|
+ "cn.com.qmth.examcloud.core.examwork.service.cache.ExamStudentPropertyCache");
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 查询考试学生属性
|
|
|
- *
|
|
|
- * @author WANGWEI
|
|
|
- * @param examId
|
|
|
- * @param studentId
|
|
|
- * @param key
|
|
|
- * @return
|
|
|
- */
|
|
|
- public static ExamStudentPropertyCacheBean getExamStudentProperty(Long examId, Long studentId,
|
|
|
- String key) {
|
|
|
- return ObjectRedisCacheProcessor.get("E_EXAM_STUDENT_PROP:",
|
|
|
- new Object[]{examId, studentId, key}, ExamStudentPropertyCacheBean.class,
|
|
|
- "EC-CORE-EXAMWORK",
|
|
|
- "cn.com.qmth.examcloud.core.examwork.service.cache.ExamStudentPropertyCache");
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 查询考试机构配置
|
|
|
+ *
|
|
|
+ * @param examId
|
|
|
+ * @param orgId
|
|
|
+ * @return
|
|
|
+ * @author WANGWEI
|
|
|
+ */
|
|
|
+ public static ExamOrgSettingsCacheBean getExamOrgSettings(Long examId, Long orgId) {
|
|
|
+ return ObjectRedisCacheProcessor.get("E_EXAM_ORG_SETTINGS:", new Object[]{examId, orgId},
|
|
|
+ ExamOrgSettingsCacheBean.class, "EC-CORE-EXAMWORK",
|
|
|
+ "cn.com.qmth.examcloud.core.examwork.service.cache.ExamOrgSettingsCache");
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 查询考试机构配置
|
|
|
- *
|
|
|
- * @param examId
|
|
|
- * @param orgId
|
|
|
- * @return
|
|
|
- * @author WANGWEI
|
|
|
- */
|
|
|
- public static ExamOrgSettingsCacheBean getExamOrgSettings(Long examId, Long orgId) {
|
|
|
- return ObjectRedisCacheProcessor.get("E_EXAM_ORG_SETTINGS:", new Object[]{examId, orgId},
|
|
|
- ExamOrgSettingsCacheBean.class, "EC-CORE-EXAMWORK",
|
|
|
- "cn.com.qmth.examcloud.core.examwork.service.cache.ExamOrgSettingsCache");
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 查询考试机构属性
|
|
|
+ *
|
|
|
+ * @param examId
|
|
|
+ * @param orgId
|
|
|
+ * @param key
|
|
|
+ * @return
|
|
|
+ * @author WANGWEI
|
|
|
+ */
|
|
|
+ public static ExamOrgPropertyCacheBean getExamOrgProperty(Long examId, Long orgId, String key) {
|
|
|
+ return ObjectRedisCacheProcessor.get("E_EXAM_ORG_PROP:", new Object[]{examId, orgId, key},
|
|
|
+ ExamOrgPropertyCacheBean.class, "EC-CORE-EXAMWORK",
|
|
|
+ "cn.com.qmth.examcloud.core.examwork.service.cache.ExamOrgPropertyCache");
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 查询考试机构属性
|
|
|
- *
|
|
|
- * @author WANGWEI
|
|
|
- * @param examId
|
|
|
- * @param orgId
|
|
|
- * @param key
|
|
|
- * @return
|
|
|
- */
|
|
|
- public static ExamOrgPropertyCacheBean getExamOrgProperty(Long examId, Long orgId, String key) {
|
|
|
- return ObjectRedisCacheProcessor.get("E_EXAM_ORG_PROP:", new Object[]{examId, orgId, key},
|
|
|
- ExamOrgPropertyCacheBean.class, "EC-CORE-EXAMWORK",
|
|
|
- "cn.com.qmth.examcloud.core.examwork.service.cache.ExamOrgPropertyCache");
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 查询考试属性
|
|
|
+ *
|
|
|
+ * @param examId
|
|
|
+ * @param key
|
|
|
+ * @return
|
|
|
+ * @author WANGWEI
|
|
|
+ */
|
|
|
+ public static ExamPropertyCacheBean getExamProperty(Long examId, String key) {
|
|
|
+ return ObjectRedisCacheProcessor.get("E_EXAM_PROP:", new Object[]{examId, key},
|
|
|
+ ExamPropertyCacheBean.class, "EC-CORE-EXAMWORK",
|
|
|
+ "cn.com.qmth.examcloud.core.examwork.service.cache.ExamPropertyCache");
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 查询考试属性
|
|
|
- *
|
|
|
- * @author WANGWEI
|
|
|
- * @param examId
|
|
|
- * @param key
|
|
|
- * @return
|
|
|
- */
|
|
|
- public static ExamPropertyCacheBean getExamProperty(Long examId, String key) {
|
|
|
- return ObjectRedisCacheProcessor.get("E_EXAM_PROP:", new Object[]{examId, key},
|
|
|
- ExamPropertyCacheBean.class, "EC-CORE-EXAMWORK",
|
|
|
- "cn.com.qmth.examcloud.core.examwork.service.cache.ExamPropertyCache");
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 查询考试
|
|
|
+ *
|
|
|
+ * @param examId
|
|
|
+ * @return
|
|
|
+ * @author WANGWEI
|
|
|
+ */
|
|
|
+ public static ExamSettingsCacheBean getExamSettings(Long examId) {
|
|
|
+ return ObjectRedisCacheProcessor.get("E_EXAM:", new Object[]{examId},
|
|
|
+ ExamSettingsCacheBean.class, "EC-CORE-EXAMWORK",
|
|
|
+ "cn.com.qmth.examcloud.core.examwork.service.cache.ExamSettingsCache");
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 查询考试
|
|
|
- *
|
|
|
- * @param examId
|
|
|
- * @return
|
|
|
- * @author WANGWEI
|
|
|
- */
|
|
|
- public static ExamSettingsCacheBean getExamSettings(Long examId) {
|
|
|
- return ObjectRedisCacheProcessor.get("E_EXAM:", new Object[]{examId},
|
|
|
- ExamSettingsCacheBean.class, "EC-CORE-EXAMWORK",
|
|
|
- "cn.com.qmth.examcloud.core.examwork.service.cache.ExamSettingsCache");
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 查询机构
|
|
|
+ *
|
|
|
+ * @param orgId
|
|
|
+ * @return
|
|
|
+ * @author WANGWEI
|
|
|
+ */
|
|
|
+ public static OrgCacheBean getOrg(Long orgId) {
|
|
|
+ return ObjectRedisCacheProcessor.get("B_ORG:", new Object[]{orgId}, OrgCacheBean.class,
|
|
|
+ "EC-CORE-BASIC", "cn.com.qmth.examcloud.core.basic.service.cache.OrgCache");
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 查询机构
|
|
|
- *
|
|
|
- * @param orgId
|
|
|
- * @return
|
|
|
- * @author WANGWEI
|
|
|
- */
|
|
|
- public static OrgCacheBean getOrg(Long orgId) {
|
|
|
- return ObjectRedisCacheProcessor.get("B_ORG:", new Object[]{orgId}, OrgCacheBean.class,
|
|
|
- "EC-CORE-BASIC", "cn.com.qmth.examcloud.core.basic.service.cache.OrgCache");
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 通过域名查询顶级机构
|
|
|
+ *
|
|
|
+ * @param domain
|
|
|
+ * @return
|
|
|
+ * @author WANGWEI
|
|
|
+ */
|
|
|
+ public static RootOrgCacheBean getRootOrg(String domain) {
|
|
|
+ return ObjectRedisCacheProcessor.get("B_ROOT_ORG:", new Object[]{domain},
|
|
|
+ RootOrgCacheBean.class, "EC-CORE-BASIC",
|
|
|
+ "cn.com.qmth.examcloud.core.basic.service.cache.RootOrgCache");
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 通过域名查询顶级机构
|
|
|
- *
|
|
|
- * @param domain
|
|
|
- * @return
|
|
|
- * @author WANGWEI
|
|
|
- */
|
|
|
- public static RootOrgCacheBean getRootOrg(String domain) {
|
|
|
- return ObjectRedisCacheProcessor.get("B_ROOT_ORG:", new Object[]{domain},
|
|
|
- RootOrgCacheBean.class, "EC-CORE-BASIC",
|
|
|
- "cn.com.qmth.examcloud.core.basic.service.cache.RootOrgCache");
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 获取机构属性
|
|
|
+ *
|
|
|
+ * @param orgId
|
|
|
+ * @param key
|
|
|
+ * @return
|
|
|
+ * @author WANGWEI
|
|
|
+ */
|
|
|
+ public static OrgPropertyCacheBean getOrgProperty(Long orgId, String key) {
|
|
|
+ return ObjectRedisCacheProcessor.get("B_ORG_PROP:", new Object[]{orgId, key},
|
|
|
+ OrgPropertyCacheBean.class, "EC-CORE-BASIC",
|
|
|
+ "cn.com.qmth.examcloud.core.basic.service.cache.OrgPropertyCache");
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 获取机构属性
|
|
|
- *
|
|
|
- * @author WANGWEI
|
|
|
- * @param orgId
|
|
|
- * @param key
|
|
|
- * @return
|
|
|
- */
|
|
|
- public static OrgPropertyCacheBean getOrgProperty(Long orgId, String key) {
|
|
|
- return ObjectRedisCacheProcessor.get("B_ORG_PROP:", new Object[]{orgId, key},
|
|
|
- OrgPropertyCacheBean.class, "EC-CORE-BASIC",
|
|
|
- "cn.com.qmth.examcloud.core.basic.service.cache.OrgPropertyCache");
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 第三方接入信息
|
|
|
+ *
|
|
|
+ * @param rootOrgId
|
|
|
+ * @param appId
|
|
|
+ * @return
|
|
|
+ * @author WANGWEI
|
|
|
+ */
|
|
|
+ public static ThirdPartyAccessCacheBean getThirdPartyAccess(Long rootOrgId, String appId) {
|
|
|
+ return ObjectRedisCacheProcessor.get("B_THIRD_PARTY_ACCESS:",
|
|
|
+ new Object[]{rootOrgId, appId}, ThirdPartyAccessCacheBean.class, "EC-CORE-BASIC",
|
|
|
+ "cn.com.qmth.examcloud.core.basic.service.cache.ThirdPartyAccessCache");
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 第三方接入信息
|
|
|
- *
|
|
|
- * @author WANGWEI
|
|
|
- * @param rootOrgId
|
|
|
- * @param appId
|
|
|
- * @return
|
|
|
- */
|
|
|
- public static ThirdPartyAccessCacheBean getThirdPartyAccess(Long rootOrgId, String appId) {
|
|
|
- return ObjectRedisCacheProcessor.get("B_THIRD_PARTY_ACCESS:",
|
|
|
- new Object[]{rootOrgId, appId}, ThirdPartyAccessCacheBean.class, "EC-CORE-BASIC",
|
|
|
- "cn.com.qmth.examcloud.core.basic.service.cache.ThirdPartyAccessCache");
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 考生信息
|
|
|
+ *
|
|
|
+ * @param examStudentId
|
|
|
+ * @return
|
|
|
+ * @author WANGWEI
|
|
|
+ */
|
|
|
+ public static ExamStudentCacheBean getExamStudent(Long examStudentId) {
|
|
|
+ return ObjectRedisCacheProcessor.get("OE_ES:", new Object[]{examStudentId},
|
|
|
+ ExamStudentCacheBean.class, "EC-CORE-OE-ADMIN",
|
|
|
+ "cn.com.qmth.examcloud.core.oe.admin.service.cache.ExamStudentCache");
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 考生信息
|
|
|
- *
|
|
|
- * @author WANGWEI
|
|
|
- * @param examStudentId
|
|
|
- * @return
|
|
|
- */
|
|
|
- public static ExamStudentCacheBean getExamStudent(Long examStudentId) {
|
|
|
- return ObjectRedisCacheProcessor.get("OE_ES:", new Object[]{examStudentId},
|
|
|
- ExamStudentCacheBean.class, "EC-CORE-OE-ADMIN",
|
|
|
- "cn.com.qmth.examcloud.core.oe.admin.service.cache.ExamStudentCache");
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 获取场次信息
|
|
|
+ *
|
|
|
+ * @param examId
|
|
|
+ * @param examStageId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public static ExamStageCacheBean getExamStage(Long examId, Long examStageId) {
|
|
|
+ return ObjectRedisCacheProcessor.get("E_EXAM_STAGE:", new Object[]{examId, examStageId},
|
|
|
+ ExamStageCacheBean.class, "EC-CORE-EXAMWORK",
|
|
|
+ "cn.com.qmth.examcloud.core.examwork.service.cache.ExamStageCache");
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 获取场次信息
|
|
|
- * @param examId
|
|
|
- * @param examStageId
|
|
|
- * @return
|
|
|
- */
|
|
|
- public static ExamStageCacheBean getExamStage(Long examId,Long examStageId) {
|
|
|
- return ObjectRedisCacheProcessor.get("E_EXAM_STAGE:", new Object[]{examId, examStageId},
|
|
|
- ExamStageCacheBean.class, "EC-CORE-EXAMWORK",
|
|
|
- "cn.com.qmth.examcloud.core.examwork.service.cache.ExamStageCache");
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 获取考试下的场次集合
|
|
|
+ *
|
|
|
+ * @param examId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public static ExamStagesCacheBean getExamStages(Long examId) {
|
|
|
+ return ObjectRedisCacheProcessor.get("E_EXAM_STAGE:", new Object[]{examId},
|
|
|
+ ExamStagesCacheBean.class, "EC-CORE-EXAMWORK",
|
|
|
+ "cn.com.qmth.examcloud.core.examwork.service.cache.ExamStagesCache");
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 获取考试下的场次集合
|
|
|
- * @param examId
|
|
|
- * @return
|
|
|
- */
|
|
|
- public static ExamStagesCacheBean getExamStages(Long examId) {
|
|
|
- return ObjectRedisCacheProcessor.get("E_EXAM_STAGE:", new Object[]{examId},
|
|
|
- ExamStagesCacheBean.class, "EC-CORE-EXAMWORK",
|
|
|
- "cn.com.qmth.examcloud.core.examwork.service.cache.ExamStagesCache");
|
|
|
- }
|
|
|
}
|