wangwei 5 vuotta sitten
vanhempi
commit
da72bed3dd

+ 17 - 1
src/main/java/cn/com/qmth/examcloud/support/cache/CacheHelper.java

@@ -5,6 +5,7 @@ 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.ExamPropertyCacheBean;
 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.ExtractConfigCacheBean;
@@ -224,10 +225,11 @@ public class CacheHelper {
 	/**
 	 * 查询考试机构属性
 	 *
+	 * @author WANGWEI
 	 * @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},
@@ -235,6 +237,20 @@ public class CacheHelper {
 				"cn.com.qmth.examcloud.core.examwork.service.cache.ExamOrgPropertyCache");
 	}
 
+	/**
+	 * 查询考试属性
+	 *
+	 * @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");
+	}
+
 	/**
 	 * 查询考试
 	 *

+ 46 - 0
src/main/java/cn/com/qmth/examcloud/support/cache/bean/ExamPropertyCacheBean.java

@@ -0,0 +1,46 @@
+package cn.com.qmth.examcloud.support.cache.bean;
+
+import cn.com.qmth.examcloud.web.cache.RandomCacheBean;
+
+/**
+ * 机构属性
+ *
+ * @author WANGWEI
+ * @date 2019年8月8日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ */
+public class ExamPropertyCacheBean extends RandomCacheBean {
+
+	private static final long serialVersionUID = -8521363493722068369L;
+
+	private Long examId;
+
+	private String key;
+
+	private String value;
+
+	public Long getExamId() {
+		return examId;
+	}
+
+	public void setExamId(Long examId) {
+		this.examId = examId;
+	}
+
+	public String getKey() {
+		return key;
+	}
+
+	public void setKey(String key) {
+		this.key = key;
+	}
+
+	public String getValue() {
+		return value;
+	}
+
+	public void setValue(String value) {
+		this.value = value;
+	}
+
+}