From 28c643cc4d3142503dfa5234777399586e8364e9 Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期六, 30 三月 2019 11:41:36 +0800
Subject: [PATCH] 添加员工服务端bug修复

---
 java110-bean/src/main/java/com/java110/entity/service/DataQuery.java |   23 +++++++++++++++++++++--
 1 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/java110-bean/src/main/java/com/java110/entity/service/DataQuery.java b/java110-bean/src/main/java/com/java110/entity/service/DataQuery.java
index 527022f..4e981d5 100644
--- a/java110-bean/src/main/java/com/java110/entity/service/DataQuery.java
+++ b/java110-bean/src/main/java/com/java110/entity/service/DataQuery.java
@@ -2,6 +2,9 @@
 
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
+import org.springframework.http.ResponseEntity;
+
+import java.util.Map;
 
 /**
  * 鏁版嵁鏌ヨ瀵硅薄
@@ -21,6 +24,9 @@
     private JSONObject responseInfo;
 
     private ServiceSql serviceSql;
+
+    //rest 杩斿洖瀵硅薄
+    private ResponseEntity responseEntity;
 
 
 
@@ -65,6 +71,13 @@
         this.serviceSql = serviceSql;
     }
 
+    public ResponseEntity getResponseEntity() {
+        return responseEntity;
+    }
+
+    public void setResponseEntity(ResponseEntity responseEntity) {
+        this.responseEntity = responseEntity;
+    }
 
     /**
      * {
@@ -89,9 +102,9 @@
         if(businessInfoObj.containsKey("business")){
             if(businessInfoObj.get("business") instanceof JSONObject){
                 currentBusinessInfo = (JSONObject) businessInfoObj.get("business");
-            }else if(businessInfoObj.get("business") instanceof JSONArray){
+            }/*else if(businessInfoObj.get("business") instanceof JSONArray){
                 currentBusinessInfo =  ((JSONArray) businessInfoObj.get("business")).getJSONObject(0);
-            }else {
+            }*/else {
                 return null;
             }
         }else{
@@ -101,4 +114,10 @@
         this.setRequestParams(currentBusinessInfo.getJSONObject("datas").getJSONObject("params"));
         return this;
     }
+
+    public DataQuery builder(Map<String, Object> headers){
+        this.setServiceCode(headers.get("service").toString());
+        this.setRequestParams(JSONObject.parseObject(JSONObject.toJSONString(headers.get("params"))));
+        return this;
+    }
 }

--
Gitblit v1.8.0