From e546f6e157e79e4074ca23f7e4e48a5c9aea4fdb Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期四, 09 五月 2019 14:30:08 +0800
Subject: [PATCH] 房屋管理开发测试完成
---
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