| | |
| | | e.printStackTrace(); |
| | | throw new CoolException("调用接口报错,请联系管理员"); |
| | | } finally { |
| | | reportApiLog(response, order.getDocType$(), nyncIp, saveRefDelivery); |
| | | reportApiLog(order, process1, process2, response, order.getDocType$(), nyncIp, saveRefDelivery); |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | private Boolean reportApiLog(Object data, String docType, String url, String path) { |
| | | String response = ""; |
| | | private Boolean reportApiLog(Order order, Object process1, Object process2, Object response, String docType, String url, String path) { |
| | | HashMap<String, Object> request = new HashMap<>(); |
| | | request.put("order", order); |
| | | request.put("process1", process1); |
| | | request.put("process2", process2); |
| | | |
| | | boolean success = false; |
| | | apiLogService.save( |
| | | docType, |
| | | url + path, |
| | | null, |
| | | "127.0.0.1", |
| | | JSON.toJSONString(data), |
| | | response, |
| | | JSON.toJSONString(request), |
| | | JSON.toJSONString(response), |
| | | success |
| | | ); |
| | | return false; |