From 1254c7d457b742e16ffc8c7820a445e1985fa55c Mon Sep 17 00:00:00 2001
From: wuxw7 <wuxw7@asiainfo.com>
Date: 星期三, 09 五月 2018 00:30:38 +0800
Subject: [PATCH] 修改 Assert.isNull(JSONObject ...) 方法bug,增加控制服务配置模板功能
---
java110-bean/src/main/java/com/java110/entity/center/DataFlow.java | 95 ++++++++++++++++++++++++++++++++++++-----------
1 files changed, 72 insertions(+), 23 deletions(-)
diff --git a/java110-bean/src/main/java/com/java110/entity/center/DataFlow.java b/java110-bean/src/main/java/com/java110/entity/center/DataFlow.java
index 9a15151..3bf7036 100644
--- a/java110-bean/src/main/java/com/java110/entity/center/DataFlow.java
+++ b/java110-bean/src/main/java/com/java110/entity/center/DataFlow.java
@@ -3,7 +3,6 @@
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
-import javax.servlet.http.HttpServletRequest;
import java.util.*;
/**
@@ -11,6 +10,9 @@
* Created by wuxw on 2018/4/13.
*/
public class DataFlow {
+
+
+ private String dataFlowId;
private String oId;
@@ -53,19 +55,26 @@
//璇锋眰瀹屾垚鏃堕棿
private Date endDate;
- private String reqJson;
+ private JSONObject reqJson;
- private String resJson;
+ private JSONObject resJson;
private List<Business> businesses;
private String requestURL;
- private List<DataFlowLinksCost> linksCostDatas = new ArrayList<DataFlowLinksCost>();
+ private List<DataFlowLinksCost> linksCostDates = new ArrayList<DataFlowLinksCost>();
private Map<String,String> headers = new HashMap<String,String>();
- private AppRoute appRoute;
+ /*private AppRoute appRoute;*/
+
+ private List<AppRoute> appRoutes = new ArrayList<AppRoute>();
+ //璇锋眰涓氬姟绯荤粺鎶ユ枃
+ private JSONObject requestBusinessJson;
+
+ //涓氬姟绯荤粺杩斿洖鎶ユ枃
+ private JSONObject responseBusinessJson;
public String getoId() {
return oId;
@@ -79,7 +88,13 @@
return businesses;
}
+ public String getDataFlowId() {
+ return dataFlowId;
+ }
+ public void setDataFlowId(String dataFlowId) {
+ this.dataFlowId = dataFlowId;
+ }
public void setBusinesses(List<Business> businesses) {
this.businesses = businesses;
@@ -231,21 +246,7 @@
this.endDate = endDate;
}
- public String getReqJson() {
- return reqJson;
- }
- public void setReqJson(String reqJson) {
- this.reqJson = reqJson;
- }
-
- public String getResJson() {
- return resJson;
- }
-
- public void setResJson(String resJson) {
- this.resJson = resJson;
- }
public String getRequestURL() {
return requestURL;
@@ -259,12 +260,20 @@
return headers;
}
- public AppRoute getAppRoute() {
+ /*public AppRoute getAppRoute() {
return appRoute;
}
public void setAppRoute(AppRoute appRoute) {
this.appRoute = appRoute;
+ }*/
+
+ public List<AppRoute> getAppRoutes() {
+ return appRoutes;
+ }
+
+ public void addAppRoutes(AppRoute appRoute) {
+ this.appRoutes.add(appRoute);
}
public String getIp() {
@@ -275,12 +284,49 @@
this.ip = ip;
}
+
+ public JSONObject getRequestBusinessJson() {
+ return requestBusinessJson;
+ }
+
+ public void setRequestBusinessJson(JSONObject requestBusinessJson) {
+ this.requestBusinessJson = requestBusinessJson;
+ }
+
+ public JSONObject getResponseBusinessJson() {
+ return responseBusinessJson;
+ }
+
+ public void setResponseBusinessJson(JSONObject responseBusinessJson) {
+ this.responseBusinessJson = responseBusinessJson;
+ }
+
+ public JSONObject getReqJson() {
+ return reqJson;
+ }
+
+ public void setReqJson(JSONObject reqJson) {
+ this.reqJson = reqJson;
+ }
+
+ public JSONObject getResJson() {
+ return resJson;
+ }
+
+ public void setResJson(JSONObject resJson) {
+ this.resJson = resJson;
+ }
+
+ public List<DataFlowLinksCost> getLinksCostDates() {
+ return linksCostDates;
+ }
+
/**
* 娣诲姞鍚勪釜鐜妭鐨勮�楁椂
* @param dataFlowLinksCost
*/
- public void addLinksCostDatas(DataFlowLinksCost dataFlowLinksCost){
- this.linksCostDatas.add(dataFlowLinksCost);
+ public void addLinksCostDates(DataFlowLinksCost dataFlowLinksCost){
+ this.linksCostDates.add(dataFlowLinksCost);
}
public DataFlow builder(String reqInfo, Map<String,String> headerAll) throws Exception{
@@ -290,8 +336,10 @@
JSONObject reqInfoObj = JSONObject.parseObject(reqInfo);
JSONObject orderObj = reqInfoObj.getJSONObject("orders");
JSONArray businessArray = reqInfoObj.getJSONArray("business");
+ this.setReqJson(reqInfoObj);
+ this.setDataFlowId(orderObj.containsKey("dataFlowId")?orderObj.getString("dataFlowId"):"-1");
this.setAppId(orderObj.getString("appId"));
- this.setAppId(orderObj.getString("transactionId"));
+ this.setTransactionId(orderObj.getString("transactionId"));
this.setUserId(orderObj.getString("userId"));
this.setOrderTypeCd(orderObj.getString("orderTypeCd"));
this.setRemark(orderObj.getString("remark"));
@@ -315,6 +363,7 @@
}catch (Exception e){
+
throw e;
}
return this;
--
Gitblit v1.8.0