From ad4aa3dea3554b168824e426e66bd9849e3193d4 Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期四, 20 六月 2019 17:08:43 +0800
Subject: [PATCH] 文档重新整理加入 开发环境搭建和生产环境搭建步骤
---
java110-core/src/main/java/com/java110/core/context/DataFlow.java | 24 ++++++++++++++++++++++--
1 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/java110-core/src/main/java/com/java110/core/context/DataFlow.java b/java110-core/src/main/java/com/java110/core/context/DataFlow.java
index 2ce6d05..41fa130 100644
--- a/java110-core/src/main/java/com/java110/core/context/DataFlow.java
+++ b/java110-core/src/main/java/com/java110/core/context/DataFlow.java
@@ -2,6 +2,7 @@
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
+import com.java110.common.constant.CommonConstant;
import com.java110.common.util.DateUtil;
import com.java110.core.factory.GenerateCodeFactory;
import com.java110.common.util.StringUtil;
@@ -115,7 +116,7 @@
}
@Override
- public Orders getOrder() {
+ public IOrders getOrder() {
return this;
}
@@ -218,7 +219,7 @@
try{
Business business = null;
JSONObject reqInfoObj = JSONObject.parseObject(reqInfo);
- JSONObject orderObj = reqInfoObj.getJSONObject("orders");
+ JSONObject orderObj = refreshOrderObj(reqInfoObj,headerAll);
Object businessObj = reqInfoObj.get("business");
JSONArray businessArray = null;
if(businessObj instanceof JSONObject){
@@ -311,4 +312,23 @@
return this;
}
+ private JSONObject refreshOrderObj(JSONObject reqInfoObj,Map<String,String> headerAll){
+
+ JSONObject reqInfoOrder = reqInfoObj.getJSONObject("orders");
+
+ if(!reqInfoOrder.containsKey("appId")) {
+ reqInfoOrder.put("appId", headerAll.get(CommonConstant.HTTP_APP_ID));
+ }
+ if(!reqInfoOrder.containsKey("transactionId")) {
+ reqInfoOrder.put("transactionId", headerAll.get(CommonConstant.HTTP_TRANSACTION_ID));
+ }
+ if(!reqInfoOrder.containsKey("sign")) {
+ reqInfoOrder.put("sign", headerAll.get(CommonConstant.HTTP_SIGN));
+ }
+
+ if(!reqInfoOrder.containsKey("requestTime")) {
+ reqInfoOrder.put("requestTime", headerAll.get(CommonConstant.HTTP_REQ_TIME));
+ }
+ return reqInfoOrder;
+ }
}
--
Gitblit v1.8.0