WANG hace 5 años
padre
commit
b61f498c82

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

@@ -3,9 +3,10 @@ package cn.com.qmth.examcloud.support.cache;
 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.ExamRecordPropertyCacheBean;
-import cn.com.qmth.examcloud.support.cache.bean.ExamOrgSettingsCacheBean;
 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.RootOrgPrivilegesCacheBean;
 import cn.com.qmth.examcloud.support.cache.bean.SmsAssemblyCacheBean;
@@ -169,4 +170,17 @@ public class CacheHelper {
 				"cn.com.qmth.examcloud.core.examwork.service.cache.ExamOrgPropertyCache");
 	}
 
+	/**
+	 * 查询考试
+	 *
+	 * @author WANGWEI
+	 * @param examId
+	 * @return
+	 */
+	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");
+	}
+
 }

+ 170 - 0
src/main/java/cn/com/qmth/examcloud/support/cache/bean/ExamSettingsCacheBean.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 ExamSettingsCacheBean 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;
+	}
+}