From 8a524787c88a9128cc69af890d4181a01aad0e8c Mon Sep 17 00:00:00 2001
From: 吴学文 <wuxuewen@wuxuewendeMacBook-Pro.local>
Date: 星期六, 06 七月 2019 23:09:33 +0800
Subject: [PATCH] 修改代码生成器生成的app 加入user_id 的问题
---
java110-core/src/main/java/com/java110/core/context/OrderDataFlow.java | 21 +++++++++++++++++----
1 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/java110-core/src/main/java/com/java110/core/context/OrderDataFlow.java b/java110-core/src/main/java/com/java110/core/context/OrderDataFlow.java
index 8e951aa..fa0ae14 100644
--- a/java110-core/src/main/java/com/java110/core/context/OrderDataFlow.java
+++ b/java110-core/src/main/java/com/java110/core/context/OrderDataFlow.java
@@ -18,8 +18,9 @@
*/
public class OrderDataFlow extends AbstractOrderDataFlowContext {
+ public OrderDataFlow(){}
- protected OrderDataFlow(Date startDate, String code) {
+ public OrderDataFlow(Date startDate, String code) {
super(startDate, code);
}
@@ -73,12 +74,15 @@
Assert.isJsonObject(reqInfo,"褰撳墠鎶ユ枃涓嶆槸鏈夋晥json,璇锋鏌�"+reqInfo);
this.setDataFlowId(UUID.randomUUID().toString().replace("-","").toLowerCase());
//璧嬪�艰姹傛姤鏂�
- this.setResJson(JSONObject.parseObject(reqInfo));
+ this.setReqJson(JSONObject.parseObject(reqInfo));
//璧嬪�� 璇锋眰澶翠俊鎭�
this.setReqHeaders(headerAll);
//鏋勫缓杩斿洖澶�
builderResHeaders();
+
+ //鏋勫缓杩斿洖json 涓簕"msg":[]}
+ builderResJson();
//鏋勫缓 璁㈠崟淇℃伅
builderOrders();
@@ -123,7 +127,7 @@
Assert.isDate(this.getReqHeaders().get(CommonConstant.HTTP_REQ_TIME),"鏋勫缓OrderDataFlow瀵硅薄澶辫触锛岃姹傚ご涓�"+CommonConstant.HTTP_REQ_TIME+"鏍煎紡閿欒");
- this.orders.setRequestTime(DateUtil.getDefaultDateFromString(this.getReqHeaders().get(CommonConstant.HTTP_REQ_TIME)));
+ this.orders.setRequestTime(this.getReqHeaders().get(CommonConstant.HTTP_REQ_TIME));
this.orders.setoId("-1");
@@ -160,7 +164,7 @@
this.businessList = new ArrayList<Business>();
- JSONArray tmpBusiness = this.getResJson().getJSONArray("business");
+ JSONArray tmpBusiness = this.getReqJson().getJSONArray("business");
Business business = null;
for (int tmpBusinessIndex = 0;tmpBusinessIndex < tmpBusiness.size();tmpBusinessIndex++){
@@ -213,6 +217,15 @@
}
}
+ /**
+ * 鍒濆鍖栨瀯寤鸿繑鍥炴姤鏂�
+ */
+ private void builderResJson(){
+ JSONObject resJson = new JSONObject();
+ resJson.put("msg",new JSONArray());
+ this.setResJson(resJson);
+ }
+
public Orders getOrders() {
return orders;
--
Gitblit v1.8.0