WANG vor 5 Jahren
Ursprung
Commit
ffe745c231

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

@@ -9,6 +9,7 @@ import cn.com.qmth.examcloud.support.cache.bean.OrgExamPropertyCacheBean;
 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;
+import cn.com.qmth.examcloud.support.cache.bean.StudentCacheBean;
 import cn.com.qmth.examcloud.support.cache.bean.SysPropertyCacheBean;
 import cn.com.qmth.examcloud.web.cache.ObjectRedisCacheProcessor;
 
@@ -126,6 +127,20 @@ public class CacheHelper {
 				"cn.com.qmth.examcloud.core.basic.service.cache.CourseCache");
 	}
 
+	/**
+	 * 查询学生
+	 *
+	 * @author WANGWEI
+	 * @param courseId
+	 * @param rootOrgId
+	 * @return
+	 */
+	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");
+	}
+
 	/**
 	 * 查询机构考试配置
 	 *

+ 115 - 0
src/main/java/cn/com/qmth/examcloud/support/cache/bean/StudentCacheBean.java

@@ -0,0 +1,115 @@
+package cn.com.qmth.examcloud.support.cache.bean;
+
+import cn.com.qmth.examcloud.web.cache.RandomCacheBean;
+
+public class StudentCacheBean extends RandomCacheBean {
+
+	private static final long serialVersionUID = 2870680150437521145L;
+
+	private Long id;
+
+	private String name;
+
+	private String identityNumber;
+
+	private String photoPath;
+
+	private String remark;
+
+	private Boolean enable;
+
+	private Long orgId;
+
+	private Long rootOrgId;
+
+	/**
+	 * 手机号码
+	 */
+	private String phoneNumber;
+
+	/**
+	 * 安全手机号码(用于登录)
+	 */
+	private String securityPhone;
+
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getIdentityNumber() {
+		return identityNumber;
+	}
+
+	public void setIdentityNumber(String identityNumber) {
+		this.identityNumber = identityNumber;
+	}
+
+	public String getPhotoPath() {
+		return photoPath;
+	}
+
+	public void setPhotoPath(String photoPath) {
+		this.photoPath = photoPath;
+	}
+
+	public String getRemark() {
+		return remark;
+	}
+
+	public void setRemark(String remark) {
+		this.remark = remark;
+	}
+
+	public Boolean getEnable() {
+		return enable;
+	}
+
+	public void setEnable(Boolean enable) {
+		this.enable = enable;
+	}
+
+	public Long getOrgId() {
+		return orgId;
+	}
+
+	public void setOrgId(Long orgId) {
+		this.orgId = orgId;
+	}
+
+	public Long getRootOrgId() {
+		return rootOrgId;
+	}
+
+	public void setRootOrgId(Long rootOrgId) {
+		this.rootOrgId = rootOrgId;
+	}
+
+	public String getPhoneNumber() {
+		return phoneNumber;
+	}
+
+	public void setPhoneNumber(String phoneNumber) {
+		this.phoneNumber = phoneNumber;
+	}
+
+	public String getSecurityPhone() {
+		return securityPhone;
+	}
+
+	public void setSecurityPhone(String securityPhone) {
+		this.securityPhone = securityPhone;
+	}
+
+}