|
@@ -1,7 +1,6 @@
|
|
|
package com.persagy.adm.server.custom.interceptor;
|
|
|
|
|
|
import com.persagy.dmp.common.constant.ResponseCode;
|
|
|
-import com.persagy.dmp.common.context.AppContext;
|
|
|
import com.persagy.dmp.common.exception.BusinessException;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.springframework.stereotype.Component;
|
|
@@ -15,8 +14,10 @@ public class AppContextInterceptor extends HandlerInterceptorAdapter {
|
|
|
|
|
|
@Override
|
|
|
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
|
|
|
- if(StringUtils.isBlank(AppContext.getContext().getGroupCode()) || StringUtils.isBlank(AppContext.getContext().getProjectId())){
|
|
|
- throw new BusinessException(ResponseCode.A0402.getCode(),ResponseCode.A0402.getDesc());
|
|
|
+ String groupCode = request.getParameter("groupCode");
|
|
|
+ String projectId = request.getParameter("projectId");
|
|
|
+ if(StringUtils.isBlank(groupCode) || StringUtils.isBlank(projectId)){
|
|
|
+ throw new BusinessException(ResponseCode.A0402.getCode(),"groupCode或者projectId为null");
|
|
|
}
|
|
|
return true;
|
|
|
}
|