WANG 5 years ago
parent
commit
ed69764290

+ 7 - 0
examcloud-exchange-starter/src/main/java/cn/com/qmth/examcloud/exchange/config/EnterpriseAccessInterceptor.java

@@ -128,6 +128,13 @@ public final class EnterpriseAccessInterceptor implements HandlerInterceptor {
 		ThirdPartyAccessCacheBean thirdPartyAccessCacheBean = CacheHelper
 		ThirdPartyAccessCacheBean thirdPartyAccessCacheBean = CacheHelper
 				.getThirdPartyAccess(rootOrgIdLong, appId);
 				.getThirdPartyAccess(rootOrgIdLong, appId);
 
 
+		if (!thirdPartyAccessCacheBean.getHasValue()) {
+			response.setStatus(HttpStatus.FORBIDDEN.value());
+			ServletUtil.returnJson(new StatusResponse("403", "rootOrgId & appId are not supported"),
+					response);
+			return false;
+		}
+
 		if (null != thirdPartyAccessCacheBean.getTimeRange()) {
 		if (null != thirdPartyAccessCacheBean.getTimeRange()) {
 			long currentTimeMillis = System.currentTimeMillis();
 			long currentTimeMillis = System.currentTimeMillis();
 			if (Math.abs(currentTimeMillis - timestampLong) > thirdPartyAccessCacheBean
 			if (Math.abs(currentTimeMillis - timestampLong) > thirdPartyAccessCacheBean