浏览代码

。。。

WANG 5 年之前
父节点
当前提交
e2b4561da9

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

@@ -19,6 +19,7 @@ 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.support.cache.bean.ThirdPartyAccessCacheBean;
 import cn.com.qmth.examcloud.web.cache.ObjectRedisCacheProcessor;
 
 /**
@@ -286,4 +287,18 @@ public class CacheHelper {
 				"cn.com.qmth.examcloud.core.basic.service.cache.OrgPropertyCache");
 	}
 
+	/**
+	 * 第三方接入信息
+	 *
+	 * @author WANGWEI
+	 * @param rootOrgId
+	 * @param appId
+	 * @return
+	 */
+	public static ThirdPartyAccessCacheBean getThirdPartyAccess(Long rootOrgId, String appId) {
+		return ObjectRedisCacheProcessor.get("B_THIRD_PARTY_ACCESS:",
+				new Object[]{rootOrgId, appId}, ThirdPartyAccessCacheBean.class, "EC-CORE-BASIC",
+				"cn.com.qmth.examcloud.core.basic.service.cache.ThirdPartyAccessCache");
+	}
+
 }

+ 68 - 0
src/main/java/cn/com/qmth/examcloud/support/cache/bean/ThirdPartyAccessCacheBean.java

@@ -0,0 +1,68 @@
+package cn.com.qmth.examcloud.support.cache.bean;
+
+import cn.com.qmth.examcloud.web.cache.RandomCacheBean;
+
+/**
+ * 第三方接入信息
+ *
+ * @author WANGWEI
+ * @date 2018年7月5日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ */
+public class ThirdPartyAccessCacheBean extends RandomCacheBean {
+
+	private static final long serialVersionUID = 9212710623859419481L;
+
+	/**
+	 * 顶级机构ID
+	 */
+	private Long rootOrgId;
+
+	/**
+	 * 应用ID
+	 */
+	private String appId;
+
+	/**
+	 * 密钥
+	 */
+	private String secretKey;
+
+	/**
+	 * 时间差范围
+	 */
+	private Long timeRange;
+
+	public Long getRootOrgId() {
+		return rootOrgId;
+	}
+
+	public void setRootOrgId(Long rootOrgId) {
+		this.rootOrgId = rootOrgId;
+	}
+
+	public String getAppId() {
+		return appId;
+	}
+
+	public void setAppId(String appId) {
+		this.appId = appId;
+	}
+
+	public String getSecretKey() {
+		return secretKey;
+	}
+
+	public void setSecretKey(String secretKey) {
+		this.secretKey = secretKey;
+	}
+
+	public Long getTimeRange() {
+		return timeRange;
+	}
+
+	public void setTimeRange(Long timeRange) {
+		this.timeRange = timeRange;
+	}
+
+}