WANG пре 6 година
родитељ
комит
63ccb7f419

+ 4 - 3
examcloud-exchange-starter/src/main/java/cn/com/qmth/examcloud/exchange/config/ThirdPartyAccessInterceptor.java → examcloud-exchange-starter/src/main/java/cn/com/qmth/examcloud/exchange/config/EnterpriseAccessInterceptor.java

@@ -31,10 +31,10 @@ import cn.com.qmth.examcloud.web.support.StatusResponse;
  * @date 2018年5月22日
  * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
  */
-public final class ThirdPartyAccessInterceptor implements HandlerInterceptor {
+public final class EnterpriseAccessInterceptor implements HandlerInterceptor {
 
 	private static final ExamCloudLog LOG = ExamCloudLogFactory
-			.getLog(ThirdPartyAccessInterceptor.class);
+			.getLog(EnterpriseAccessInterceptor.class);
 
 	/**
 	 * 接口日志
@@ -128,7 +128,8 @@ public final class ThirdPartyAccessInterceptor implements HandlerInterceptor {
 			return false;
 		}
 
-		request.setAttribute("$rootOrgId", rootOrgIdLong);
+		request.setAttribute(HttpServletRequestAttribute.$_ENTERPRISE_ROOT_ORG_ID.name(),
+				rootOrgIdLong);
 
 		String key = "$_A_:" + rootOrgId + "_" + appId;
 

+ 1 - 0
examcloud-exchange-starter/src/main/java/cn/com/qmth/examcloud/exchange/config/ExamCloudWebMvcConfigurer.java

@@ -31,6 +31,7 @@ public class ExamCloudWebMvcConfigurer implements WebMvcConfigurer {
 	@Override
 	public void addInterceptors(InterceptorRegistry registry) {
 		registry.addInterceptor(new FirstInterceptor()).addPathPatterns("/**");
+		registry.addInterceptor(new EnterpriseAccessInterceptor()).addPathPatterns("/**");
 		registry.addInterceptor(new RpcInterceptor(resourceManager)).addPathPatterns("/**");
 
 		RequestPermissionInterceptor permissionInterceptor = new RequestPermissionInterceptor(