| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.common.util.DateUtil; |
| | | import com.java110.common.util.SequenceUtil; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.common.util.StringUtil; |
| | | import com.java110.entity.center.AppRoute; |
| | | import com.java110.entity.center.Business; |
| | |
| | | Business business = null; |
| | | JSONObject reqInfoObj = JSONObject.parseObject(reqInfo); |
| | | JSONObject orderObj = reqInfoObj.getJSONObject("orders"); |
| | | JSONArray businessArray = reqInfoObj.getJSONArray("business"); |
| | | Object businessObj = reqInfoObj.get("business"); |
| | | JSONArray businessArray = null; |
| | | if(businessObj instanceof JSONObject){ |
| | | businessArray = new JSONArray(); |
| | | businessArray.add(reqInfoObj.getJSONObject("business")); |
| | | }else if(businessObj instanceof JSONArray){ |
| | | businessArray = reqInfoObj.getJSONArray("business"); |
| | | }else{ |
| | | // 不做处理 |
| | | } |
| | | |
| | | this.setReqData(reqInfo); |
| | | this.setReqJson(reqInfoObj); |
| | | this.setDataFlowId(orderObj.containsKey("dataFlowId")?orderObj.getString("dataFlowId"):"-1"); |
| | |
| | | } |
| | | |
| | | if (headerAll != null){ |
| | | this.headers.putAll(headerAll); |
| | | this.setRequestURL(headers.get("REQUEST_URL")); |
| | | this.setIp(headers.get("IP")); |
| | | this.requestHeaders.putAll(headerAll); |
| | | this.requestCurrentHeaders.putAll(headerAll); |
| | | this.setRequestURL(requestHeaders.get("REQUEST_URL")); |
| | | this.setIp(requestHeaders.get("IP")); |
| | | } |
| | | |
| | | |
| | |
| | | this.setReqData(reqInfo); |
| | | this.setDataFlowId("-1"); |
| | | this.setAppId(headerAll.get("appId")); |
| | | this.setTransactionId(StringUtil.isNullOrNone(headerAll.get("transactionId"))? SequenceUtil.getTransactionId():headerAll.get("transactionId")); |
| | | this.setTransactionId(StringUtil.isNullOrNone(headerAll.get("transactionId"))? GenerateCodeFactory.getTransactionId():headerAll.get("transactionId")); |
| | | this.setUserId(StringUtil.isNullOrNone(headerAll.get("userId"))? "-1":headerAll.get("userId")); |
| | | this.setOrderTypeCd("T"); |
| | | this.setRemark(StringUtil.isNullOrNone(headerAll.get("remark"))? "":headerAll.get("remark")); |
| | |
| | | } |
| | | |
| | | if (headerAll != null){ |
| | | this.headers.putAll(headerAll); |
| | | this.setRequestURL(headers.get("REQUEST_URL")); |
| | | this.setIp(headers.get("IP")); |
| | | this.requestHeaders.putAll(headerAll); |
| | | this.requestCurrentHeaders.putAll(headerAll); |
| | | this.setRequestURL(requestHeaders.get("REQUEST_URL")); |
| | | this.setIp(requestHeaders.get("IP")); |
| | | } |
| | | |
| | | |