wangwei 5 years ago
parent
commit
28965039a2

+ 16 - 0
src/main/java/cn/com/qmth/examcloud/support/cache/CacheHelper.java

@@ -8,6 +8,7 @@ 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.ExamStudentCacheBean;
 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;
@@ -351,4 +352,19 @@ public class CacheHelper {
 				"cn.com.qmth.examcloud.core.basic.service.cache.ThirdPartyAccessCache");
 	}
 
+	/**
+	 * 考生信息
+	 *
+	 * @author WANGWEI
+	 * @param studentId
+	 * @param examId
+	 * @param courseId
+	 * @return
+	 */
+	public static ExamStudentCacheBean getExamStudent(Long studentId, Long examId, Long courseId) {
+		return ObjectRedisCacheProcessor.get("OE_ES:", new Object[]{studentId, examId, courseId},
+				ExamStudentCacheBean.class, "EC-CORE-OE-ADMIN",
+				"cn.com.qmth.examcloud.core.oe.admin.service.cache.ExamStudentCache");
+	}
+
 }

+ 107 - 0
src/main/java/cn/com/qmth/examcloud/support/cache/bean/ExamStudentCacheBean.java

@@ -0,0 +1,107 @@
+package cn.com.qmth.examcloud.support.cache.bean;
+
+import cn.com.qmth.examcloud.web.cache.RandomCacheBean;
+
+/**
+ * exam student
+ *
+ * @author WANGWEI
+ * @date 2019年12月10日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ */
+public class ExamStudentCacheBean extends RandomCacheBean {
+
+	private static final long serialVersionUID = -645838123919802377L;
+
+	/**
+	 * 考生ID
+	 */
+	private Long examStudentId;
+
+	/**
+	 * 考试ID
+	 */
+	private Long examId;
+
+	/**
+	 * 学生ID
+	 */
+	private Long studentId;
+
+	/**
+	 * 课程ID
+	 */
+	private Long courseId;
+
+	/**
+	 * 已经考试的次数
+	 */
+	private Integer usedNum;
+
+	/**
+	 * 补加的考试次数
+	 */
+	private Integer extraNum;
+
+	/**
+	 * 是否可用
+	 */
+	private Boolean enable;
+
+	public Long getExamStudentId() {
+		return examStudentId;
+	}
+
+	public void setExamStudentId(Long examStudentId) {
+		this.examStudentId = examStudentId;
+	}
+
+	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 Long getCourseId() {
+		return courseId;
+	}
+
+	public void setCourseId(Long courseId) {
+		this.courseId = courseId;
+	}
+
+	public Integer getUsedNum() {
+		return usedNum;
+	}
+
+	public void setUsedNum(Integer usedNum) {
+		this.usedNum = usedNum;
+	}
+
+	public Integer getExtraNum() {
+		return extraNum;
+	}
+
+	public void setExtraNum(Integer extraNum) {
+		this.extraNum = extraNum;
+	}
+
+	public Boolean getEnable() {
+		return enable;
+	}
+
+	public void setEnable(Boolean enable) {
+		this.enable = enable;
+	}
+
+}