From 00aad4b05e7921595705fc7550adb81140dca77f Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期六, 13 四月 2019 14:56:31 +0800
Subject: [PATCH] 添加员工权限bug修复

---
 OrderService/src/main/java/com/java110/order/smo/impl/OrderServiceSMOImpl.java |   25 ++++++++++++++-----------
 1 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/OrderService/src/main/java/com/java110/order/smo/impl/OrderServiceSMOImpl.java b/OrderService/src/main/java/com/java110/order/smo/impl/OrderServiceSMOImpl.java
index 81fbef4..9ba946f 100644
--- a/OrderService/src/main/java/com/java110/order/smo/impl/OrderServiceSMOImpl.java
+++ b/OrderService/src/main/java/com/java110/order/smo/impl/OrderServiceSMOImpl.java
@@ -111,7 +111,7 @@
         } finally {
 
             if(responseEntity == null){
-                responseEntity = new ResponseEntity<String>(dataFlow.getResJson().getString("msg"),OrderDataFlowContextFactory.hashMap2MultiValueMap(dataFlow.getResHeaders()),HttpStatus.OK);
+                responseEntity = new ResponseEntity<String>(dataFlow.getResJson().getJSONArray("msg").toJSONString(),OrderDataFlowContextFactory.hashMap2MultiValueMap(dataFlow.getResHeaders()),HttpStatus.OK);
             }
             if(dataFlow != null) {
                 //娣诲姞鑰楁椂
@@ -136,11 +136,11 @@
      */
     private void refreshOrderDataFlowResJson(IOrderDataFlowContext dataFlow){
 
-        if(dataFlow.getResJson() == null || dataFlow.getResJson().isEmpty()){
-            JSONObject resJson = new JSONObject();
-            resJson.put("msg","鎴愬姛");
-            dataFlow.setResJson(resJson);
-        }
+//        if(dataFlow.getResJson() == null || dataFlow.getResJson().isEmpty()){
+//            JSONObject resJson = new JSONObject();
+//            resJson.put("msg","鎴愬姛");
+//            dataFlow.setResJson(resJson);
+//        }
 
     }
 
@@ -883,22 +883,25 @@
             if(urls.length != 2){
                 throw new ConfigDataException(ResponseConstant.RESULT_CODE_CONFIG_ERROR,"閰嶇疆閿欒锛歝_service_business閰嶇疆url瀛楁閿欒"+serviceBusiness.getBusinessTypeCd());
             }
-            String webserviceUrl = CodeMapUtil.getDynamicConstantValue(urls[0]);
-            String method = CodeMapUtil.getDynamicConstantValue(urls[1]);
+            String webserviceUrl = MappingCache.getValue(urls[0]);
+            String method = MappingCache.getValue(urls[1]);
             responseMessage = (String) WebServiceAxisClient.callWebService(webserviceUrl,method,
                     new Object[]{requestBusinessJson.toJSONString()},
                     serviceBusiness.getTimeout());
         }else if(ServiceBusinessConstant.INVOKE_TYPE_HTTP_POST.equals(serviceBusiness.getInvokeType())){
             //http://user-service/test/sayHello
-            String httpPostUrl = CodeMapUtil.getDynamicConstantValue(serviceBusiness.getUrl());
+            String httpPostUrl = MappingCache.getValue(serviceBusiness.getUrl());
             responseMessage = restTemplate.postForObject(httpPostUrl,requestBusinessJson.toJSONString(),String.class);
         }else if(ServiceBusinessConstant.INVOKE_TYPE_OUT_HTTP_POST.equals(serviceBusiness.getInvokeType())){
-            String httpPostUrl = CodeMapUtil.getDynamicConstantValue(serviceBusiness.getUrl());
+            String httpPostUrl = MappingCache.getValue(serviceBusiness.getUrl());
             responseMessage = restTemplateNoLoadBalanced.postForObject(httpPostUrl,requestBusinessJson.toJSONString(),String.class);
         }
         else {//post鏂瑰紡
             throw new ConfigDataException(ResponseConstant.RESULT_CODE_CONFIG_ERROR,"閰嶇疆閿欒锛歝_service_business閰嶇疆url瀛楁閿欒,褰撳墠鏃犳硶璇嗗埆"+serviceBusiness.getBusinessTypeCd());
         }
+
+
+        logger.debug("璁㈠崟鏈嶅姟璋冪敤涓嬫父鏈嶅姟璇锋眰鎶ユ枃锛歿}锛岃繑鍥炴姤鏂囷細{}",requestBusinessJson,responseMessage);
 
         if(StringUtil.isNullOrNone(responseMessage) || !Assert.isJsonObject(responseMessage)){
             throw new BusinessException(ResponseConstant.RESULT_CODE_INNER_ERROR,"涓嬫父绯荤粺杩斿洖鏍煎紡涓嶆纭紝璇锋寜鍗忚瑙勮寖澶勭悊");
@@ -956,7 +959,7 @@
             JSONObject responseJson = doRequestBusinessSystem(dataFlow, serviceBusiness, requestBusinessJson);
 
             //鍙戝竷浜嬩欢
-            DataFlowEventPublishing.invokeBusinessBSuccess(dataFlow,business);
+            DataFlowEventPublishing.invokeBusinessBSuccess(dataFlow,business,responseJson);
 
             responseBusinesses.add(responseJson);
 

--
Gitblit v1.8.0