java110
2023-01-30 400795021ce677daf900e6c2818998222212f8a3
springboot/src/main/java/com/java110/boot/smo/impl/ApiServiceSMOImpl.java
@@ -154,7 +154,7 @@
        String serviceCode = dataFlow.getRequestHeaders().get(CommonConstant.HTTP_SERVICE);
        String logServiceCode = MappingCache.getValue(MappingCache.LOG_SERVICE_CODE);
        String logServiceCode = MappingCache.getValue(MappingConstant.DOMAIN_SYSTEM_SWITCH,MappingCache.LOG_SERVICE_CODE);
        //日志查询不记录
        if ("/transactionLog/queryTransactionLog".equals(serviceCode)
@@ -162,7 +162,7 @@
                || "file.getFile".equals(serviceCode)
                || "file.getFileByObjId".equals(serviceCode)
                || "/machine/heartbeat".equals(serviceCode) // 心跳也不记录
        ) {
                ) {
            return;
        }
@@ -453,7 +453,9 @@
                }
                responseEntity = outRestTemplate.exchange(requestUrl, HttpMethod.DELETE, httpEntity, String.class);
            } else {
                responseEntity = outRestTemplate.exchange(service.getUrl(), HttpMethod.POST, httpEntity, String.class);
                String requestUrl = BootReplaceUtil.replaceServiceName(service.getUrl());
                responseEntity = outRestTemplate.exchange(requestUrl, HttpMethod.POST, httpEntity, String.class);
            }
        } catch (HttpStatusCodeException e) { //这里spring 框架 在4XX 或 5XX 时抛出 HttpServerErrorException 异常,需要重新封装一下
            responseEntity = new ResponseEntity<String>(e.getResponseBodyAsString(), e.getStatusCode());
@@ -621,7 +623,7 @@
    private void saveLogMessage(String requestJson, String responseJson) {
        try {
            if (MappingConstant.VALUE_ON.equals(MappingCache.getValue(MappingConstant.KEY_LOG_ON_OFF))) {
            if (MappingConstant.VALUE_ON.equals(MappingCache.getValue(MappingConstant.DOMAIN_SYSTEM_SWITCH,MappingConstant.KEY_LOG_ON_OFF))) {
                JSONObject log = new JSONObject();
                log.put("request", requestJson);
                log.put("response", responseJson);
@@ -639,7 +641,7 @@
     */
    private void saveCostTimeLogMessage(DataFlow dataFlow) {
        try {
            if (MappingConstant.VALUE_ON.equals(MappingCache.getValue(MappingConstant.KEY_COST_TIME_ON_OFF))) {
            if (MappingConstant.VALUE_ON.equals(MappingCache.getValue(MappingConstant.DOMAIN_SYSTEM_SWITCH,MappingConstant.KEY_COST_TIME_ON_OFF))) {
                List<DataFlowLinksCost> dataFlowLinksCosts = dataFlow.getLinksCostDates();
                JSONObject costDate = new JSONObject();
                JSONArray costDates = new JSONArray();