wangwei 5 年之前
父节点
当前提交
acd29585a5

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

@@ -8,6 +8,8 @@ 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.ExamStudentPropertyCacheBean;
+import cn.com.qmth.examcloud.support.cache.bean.ExamStudentSettingsCacheBean;
 import cn.com.qmth.examcloud.support.cache.bean.ExtractConfigCacheBean;
 import cn.com.qmth.examcloud.support.cache.bean.ExtractConfigPaperCacheBean;
 import cn.com.qmth.examcloud.support.cache.bean.OrgCacheBean;
@@ -208,6 +210,38 @@ public class CacheHelper {
 				"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");
+	}
+
+	/**
+	 * 查询考试学生属性
+	 *
+	 * @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");
+	}
+
 	/**
 	 * 查询考试机构配置
 	 *
@@ -233,7 +267,7 @@ public class CacheHelper {
 	 */
 	public static ExamOrgPropertyCacheBean getExamOrgProperty(Long examId, Long orgId, String key) {
 		return ObjectRedisCacheProcessor.get("E_EXAM_ORG_PROP:", new Object[]{examId, orgId, key},
-				ExamOrgSettingsCacheBean.class, "EC-CORE-EXAMWORK",
+				ExamOrgPropertyCacheBean.class, "EC-CORE-EXAMWORK",
 				"cn.com.qmth.examcloud.core.examwork.service.cache.ExamOrgPropertyCache");
 	}
 

+ 56 - 0
src/main/java/cn/com/qmth/examcloud/support/cache/bean/ExamStudentPropertyCacheBean.java

@@ -0,0 +1,56 @@
+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 ExamStudentPropertyCacheBean extends RandomCacheBean {
+
+	private static final long serialVersionUID = -8521363493722068369L;
+
+	private Long examId;
+
+	private Long studentId;
+
+	private String key;
+
+	private String value;
+
+	public Long getExamId() {
+		return examId;
+	}
+
+	public void setExamId(Long examId) {
+		this.examId = examId;
+	}
+
+	public Long getStudentId() {
+		return studentId;
+	}
+
+	public void setStudentId(Long studentId) {
+		this.studentId = studentId;
+	}
+
+	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;
+	}
+
+}

+ 170 - 0
src/main/java/cn/com/qmth/examcloud/support/cache/bean/ExamStudentSettingsCacheBean.java

@@ -0,0 +1,170 @@
+package cn.com.qmth.examcloud.support.cache.bean;
+
+import cn.com.qmth.examcloud.web.cache.RandomCacheBean;
+
+import java.util.Date;
+
+/**
+ * 机构考试配置
+ *
+ * @author WANGWEI
+ * @date 2019年8月8日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ */
+public class ExamStudentSettingsCacheBean extends RandomCacheBean {
+
+	private static final long serialVersionUID = -8007446755455123835L;
+
+	private Long id;
+
+	/**
+	 * 考试编码
+	 */
+	private String code;
+
+	/**
+	 * 顶级机构Id
+	 */
+	private Long rootOrgId;
+
+	/**
+	 * 考试批次开始时间
+	 */
+	private Date beginTime;
+
+	/**
+	 * 考试批次结束时间
+	 */
+	private Date endTime;
+
+	/**
+	 * 考试名称
+	 */
+	private String name;
+
+	/**
+	 * 考试类型
+	 */
+	private String examType;
+
+	/**
+	 * 考试时长
+	 */
+	private Integer duration;
+
+	/**
+	 * 是否可用
+	 */
+	private Boolean enable;
+
+	/**
+	 * 考试备注
+	 */
+	private String remark;
+
+	/**
+	 * 考试次数
+	 */
+	private Long examTimes;
+
+	/**
+	 * 是否禁止考试
+	 */
+	private Boolean examLimit;
+
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public String getCode() {
+		return code;
+	}
+
+	public void setCode(String code) {
+		this.code = code;
+	}
+
+	public Long getRootOrgId() {
+		return rootOrgId;
+	}
+
+	public void setRootOrgId(Long rootOrgId) {
+		this.rootOrgId = rootOrgId;
+	}
+
+	public Date getBeginTime() {
+		return beginTime;
+	}
+
+	public void setBeginTime(Date beginTime) {
+		this.beginTime = beginTime;
+	}
+
+	public Date getEndTime() {
+		return endTime;
+	}
+
+	public void setEndTime(Date endTime) {
+		this.endTime = endTime;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getExamType() {
+		return examType;
+	}
+
+	public void setExamType(String examType) {
+		this.examType = examType;
+	}
+
+	public Integer getDuration() {
+		return duration;
+	}
+
+	public void setDuration(Integer duration) {
+		this.duration = duration;
+	}
+
+	public Boolean getEnable() {
+		return enable;
+	}
+
+	public void setEnable(Boolean enable) {
+		this.enable = enable;
+	}
+
+	public String getRemark() {
+		return remark;
+	}
+
+	public void setRemark(String remark) {
+		this.remark = remark;
+	}
+
+	public Long getExamTimes() {
+		return examTimes;
+	}
+
+	public void setExamTimes(Long examTimes) {
+		this.examTimes = examTimes;
+	}
+
+	public Boolean getExamLimit() {
+		return examLimit;
+	}
+
+	public void setExamLimit(Boolean examLimit) {
+		this.examLimit = examLimit;
+	}
+}