From 2ce35cb8d146582b32fd8867ef27ac2930da6ae3 Mon Sep 17 00:00:00 2001
From: 吴学文 <wuxuewen@wuxuewendeMacBook-Pro.local>
Date: 星期二, 09 七月 2019 23:11:49 +0800
Subject: [PATCH] 根据师延俊建议将菜单改为折叠方式

---
 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