From c5aac73ec29f74904b544a722037b39bbb85ab3e Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期四, 07 二月 2019 21:35:35 +0800
Subject: [PATCH] 去serviceCode 改为businessTypeCd 完成

---
 java110-event/src/main/java/com/java110/event/service/BusinessServiceDataFlowEventPublishing.java |   34 +++++++++++++++++-----------------
 1 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/java110-event/src/main/java/com/java110/event/service/BusinessServiceDataFlowEventPublishing.java b/java110-event/src/main/java/com/java110/event/service/BusinessServiceDataFlowEventPublishing.java
index 8846fd6..1cb6c22 100644
--- a/java110-event/src/main/java/com/java110/event/service/BusinessServiceDataFlowEventPublishing.java
+++ b/java110-event/src/main/java/com/java110/event/service/BusinessServiceDataFlowEventPublishing.java
@@ -55,23 +55,23 @@
 
     /**
      * 鏍规嵁鏄惁瀹炵幇浜嗘煇涓帴鍙o紝杩斿洖渚﹀惉
-     * @param serviceCode
+     * @param businessTypeCd
      * @since 1.8
      * @return
      */
-    public static List<BusinessServiceDataFlowListener> getListeners(String serviceCode){
+    public static List<BusinessServiceDataFlowListener> getListeners(String businessTypeCd){
 
-        Assert.hasLength(serviceCode,"鑾峰彇闇�瑕佸彂甯冪殑浜嬩欢澶勭悊渚﹀惉鏃讹紝浼犻�掍簨浠朵负绌猴紝璇锋鏌�");
+        Assert.hasLength(businessTypeCd,"鑾峰彇闇�瑕佸彂甯冪殑浜嬩欢澶勭悊渚﹀惉鏃讹紝浼犻�掍簨浠朵负绌猴紝璇锋鏌�");
 
         //鍏堜粠缂撳瓨涓幏鍙栵紝涓轰簡鎻愬崌鏁堢巼
-        if(cacheListenersMap.containsKey(serviceCode)){
-            return cacheListenersMap.get(serviceCode);
+        if(cacheListenersMap.containsKey(businessTypeCd)){
+            return cacheListenersMap.get(businessTypeCd);
         }
 
         List<BusinessServiceDataFlowListener> dataFlowListeners = new ArrayList<BusinessServiceDataFlowListener>();
         for(String listenerBeanName : getListeners()){
             BusinessServiceDataFlowListener listener = ApplicationContextFactory.getBean(listenerBeanName,BusinessServiceDataFlowListener.class);
-            if(serviceCode.equals(listener.getServiceCode())){
+            if(businessTypeCd.equals(listener.getBusinessTypeCd())){
                 dataFlowListeners.add(listener);
             }
         }
@@ -80,7 +80,7 @@
         DataFlowListenerOrderComparator.sort(dataFlowListeners);
 
         //灏嗘暟鎹斁鍏ョ紦瀛樹腑
-        cacheListenersMap.put(serviceCode,dataFlowListeners);
+        cacheListenersMap.put(businessTypeCd,dataFlowListeners);
         return dataFlowListeners;
     }
 
@@ -91,29 +91,29 @@
      */
     public static void multicastEvent(DataFlowContext dataFlowContext) throws BusinessException{
         Assert.notNull(dataFlowContext.getCurrentBusiness(),"褰撳墠娌℃湁鍙鐞嗙殑涓氬姟淇℃伅锛�");
-        multicastEvent(dataFlowContext.getCurrentBusiness().getServiceCode(),dataFlowContext,null);
+        multicastEvent(dataFlowContext.getCurrentBusiness().getBusinessTypeCd(),dataFlowContext,null);
     }
 
 
     /**
      * 鍙戝竷浜嬩欢
-     * @param serviceCode
+     * @param businessTypeCd
      * @param dataFlowContext
      */
-    public static void multicastEvent(String serviceCode,DataFlowContext dataFlowContext) throws BusinessException{
-        multicastEvent(serviceCode,dataFlowContext,null);
+    public static void multicastEvent(String businessTypeCd,DataFlowContext dataFlowContext) throws BusinessException{
+        multicastEvent(businessTypeCd,dataFlowContext,null);
     }
 
     /**
      * 鍙戝竷浜嬩欢
-     * @param serviceCode
+     * @param businessTypeCd
      * @param dataFlowContext 杩欎釜璁㈠崟淇℃伅锛屼互渚夸簬 渚﹀惉閭h竟闇�瑕佺敤
      */
-    public static void multicastEvent(String serviceCode,DataFlowContext dataFlowContext,String asyn) throws  BusinessException{
+    public static void multicastEvent(String businessTypeCd,DataFlowContext dataFlowContext,String asyn) throws  BusinessException{
         try {
-            BusinessServiceDataFlowEvent targetDataFlowEvent = new BusinessServiceDataFlowEvent(serviceCode,dataFlowContext);
+            BusinessServiceDataFlowEvent targetDataFlowEvent = new BusinessServiceDataFlowEvent(businessTypeCd,dataFlowContext);
 
-            multicastEvent(serviceCode,targetDataFlowEvent, asyn);
+            multicastEvent(businessTypeCd,targetDataFlowEvent, asyn);
         }catch (Exception e){
             throw new BusinessException(ResponseConstant.RESULT_CODE_INNER_ERROR,"鍙戝竷渚﹀惉澶辫触锛屽け璐ュ師鍥犱负锛�"+e);
         }
@@ -126,8 +126,8 @@
      * @param event
      * @param asyn A 琛ㄧず寮傛澶勭悊
      */
-    public static void multicastEvent(String serviceCode,final BusinessServiceDataFlowEvent event, String asyn) {
-        for (final BusinessServiceDataFlowListener listener : getListeners(serviceCode)) {
+    public static void multicastEvent(String businessTypeCd,final BusinessServiceDataFlowEvent event, String asyn) {
+        for (final BusinessServiceDataFlowListener listener : getListeners(businessTypeCd)) {
 
             if(CommonConstant.PROCESS_ORDER_ASYNCHRONOUS.equals(asyn)){ //寮傛澶勭悊
 

--
Gitblit v1.8.0