WANG 6 jaren geleden
bovenliggende
commit
0b42d562a1

+ 2 - 2
examcloud-exchange-starter/src/main/java/cn/com/qmth/examcloud/exchange/config/ThirdPartyAccessInterceptor.java

@@ -63,8 +63,6 @@ public final class ThirdPartyAccessInterceptor implements HandlerInterceptor {
 		String appId = request.getHeader("appId");
 		String timestamp = request.getHeader("timestamp");
 
-		request.setAttribute("$rootOrgId", rootOrgId);
-
 		if (StringUtils.isBlank(accessToken) || StringUtils.isBlank(rootOrgId)
 				|| StringUtils.isBlank(appId) || StringUtils.isBlank(timestamp)) {
 			response.setStatus(HttpStatus.FORBIDDEN.value());
@@ -87,6 +85,8 @@ public final class ThirdPartyAccessInterceptor implements HandlerInterceptor {
 			return false;
 		}
 
+		request.setAttribute("$rootOrgId", Long.parseLong(rootOrgId));
+
 		String key = "A_" + rootOrgId + appId;
 
 		ThirdPartyAccessBean thirdPartyAccessBean = redisClient.get(key, ThirdPartyAccessBean.class,