Forráskód Böngészése

侦听修复bug修复

wuxw7 7 éve%!(EXTRA string=óta)
szülő
commit
578f461e75

+ 6 - 0
Api/src/main/java/com/java110/api/smo/impl/ApiServiceSMOImpl.java

@@ -284,6 +284,12 @@ public class ApiServiceSMOImpl extends LoggerEngine implements IApiServiceSMO {
         AppService appService = DataFlowFactory.getService(dataFlow, dataFlow.getRequestHeaders().get(CommonConstant.HTTP_SERVICE));
         //这里对透传类处理
         if("NT".equals(appService.getIsInstance())){
+            //如果是透传类 请求方式必须与接口提供方调用方式一致
+            String httpMethod = dataFlow.getRequestCurrentHeaders().get(CommonConstant.HTTP_METHOD);
+            if(!appService.getMethod().equals(httpMethod)) {
+                throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_ERROR,
+                        "服务【" + appService.getServiceCode() + "】调用方式不对请检查,当前请求方式为:"+httpMethod);
+            }
             dataFlow.setApiCurrentService(ServiceCodeConstant.SERVICE_CODE_DO_SERVICE_TRANSFER);
         }else{
             dataFlow.setApiCurrentService(dataFlow.getRequestHeaders().get(CommonConstant.HTTP_SERVICE));

+ 0 - 8
java110-event/src/main/java/com/java110/event/service/api/ServiceDataFlowEventPublishing.java

@@ -148,14 +148,6 @@ public class ServiceDataFlowEventPublishing extends LoggerEngine {
                     "服务【" + serviceCode + "】调用方式【"+httpMethod+"】当前不支持");
         }
         for (final ServiceDataFlowListener listener : listeners) {
-            //如果是透传类 请求方式必须与接口提供方调用方式一致
-            if(ServiceCodeConstant.SERVICE_CODE_DO_SERVICE_TRANSFER.equals(serviceCode)){
-                AppService appService = event.getAppService();
-                if(!appService.getMethod().equals(httpMethod)) {
-                    throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_ERROR,
-                            "服务【" + serviceCode + "】调用方式不对请检查,当前请求方式为:"+httpMethod);
-                }
-            }
 
             if(CommonConstant.PROCESS_ORDER_ASYNCHRONOUS.equals(asyn)){ //异步处理