Browse Source

清理所有middleware.group.code的使用。
解决香港置地关系导入到博锐科技问题,并避免其他类似问题。

yucheng 3 years ago
parent
commit
f6426331c9

+ 4 - 6
src/main/java/com/persagy/proxy/common/service/impl/EmsAuthServiceImpl.java

@@ -12,8 +12,6 @@ import com.persagy.dmp.common.constant.CommonConstant;
 import com.persagy.dmp.common.constant.ResponseCode;
 import com.persagy.dmp.common.context.AppContext;
 import com.persagy.dmp.common.exception.BusinessException;
-import com.persagy.dmp.common.helper.SpringHelper;
-import com.persagy.proxy.adm.constant.AdmCommonConstant;
 import org.springframework.beans.factory.annotation.Autowired;
 
 import javax.servlet.http.HttpServletRequest;
@@ -69,10 +67,10 @@ public class EmsAuthServiceImpl extends AbstractAuthServiceImpl {
                 }
             }
         }
-        if (StrUtil.isBlank(AppContext.getContext().getGroupCode())){
-            // 无集团编码时,默认为配置的集团编码
-            AppContext.getContext().setGroupCode(SpringHelper.getString(AdmCommonConstant.MIDDLEWARE_GROUP_CODE));
-        }
+//        if (StrUtil.isBlank(AppContext.getContext().getGroupCode())){
+//            // 无集团编码时,默认为配置的集团编码
+//            AppContext.getContext().setGroupCode(SpringHelper.getString(AdmCommonConstant.MIDDLEWARE_GROUP_CODE));
+//        }
         // 2.验证集团是否有效
         if (StrUtil.isBlank(AppContext.getContext().getGroupCode())
                 || !groupMap.containsKey(AppContext.getContext().getGroupCode())){

+ 1 - 2
src/main/java/com/persagy/proxy/common/service/impl/NoneAuthServiceImpl.java

@@ -5,7 +5,6 @@ import com.persagy.dmp.auth.service.impl.AbstractAuthServiceImpl;
 import com.persagy.dmp.common.constant.CommonConstant;
 import com.persagy.dmp.common.context.AppContext;
 import com.persagy.dmp.common.helper.SpringHelper;
-import com.persagy.proxy.adm.constant.AdmCommonConstant;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -38,7 +37,7 @@ public class NoneAuthServiceImpl extends AbstractAuthServiceImpl {
         // 无集团编码时,默认为配置的集团编码
         String groupCode = request.getHeader("groupCode");
         if(StrUtil.isBlank(groupCode)) {
-            context.setGroupCode(SpringHelper.getString(AdmCommonConstant.MIDDLEWARE_GROUP_CODE));
+            context.setGroupCode(SpringHelper.getString("middleware.group.code"));
         }
         // 无项目id时,尝试从请求URL中获取
         if (StrUtil.isBlank(request.getHeader("projectId"))