chengf
2026-01-27 b6184e2ddf3db37a94f7efb3b619bbc64642a292
service-api/src/main/java/com/java110/api/smo/impl/ApiServiceSMOImpl.java
@@ -156,7 +156,7 @@
        String serviceCode = dataFlow.getRequestHeaders().get(CommonConstant.HTTP_SERVICE);
        String logServiceCode = MappingCache.getValue(MappingConstant.DOMAIN_SYSTEM_SWITCH,MappingCache.LOG_SERVICE_CODE);
        String logServiceCode = MappingCache.getValue(MappingConstant.DOMAIN_SYSTEM_SWITCH, MappingCache.LOG_SERVICE_CODE);
        //日志查询不记录
        if ("/transactionLog/queryTransactionLog".equals(serviceCode)
@@ -164,7 +164,7 @@
                || "file.getFile".equals(serviceCode)
                || "file.getFileByObjId".equals(serviceCode)
                || "/machine/heartbeat".equals(serviceCode) // 心跳也不记录
                ) {
        ) {
            return;
        }
@@ -318,12 +318,12 @@
            throw new NoAuthorityException(ResponseConstant.RESULT_CODE_NO_AUTHORITY_ERROR, "TRANSACTION_ID 不能为空");
        }
        if (!StringUtil.isNullOrNone(dataFlow.getAppRoutes().get(0).getSecurityCode())) {
            String sign = AuthenticationFactory.apiDataFlowMd5(dataFlow);
            if (StringUtil.isEmpty(dataFlow.getReqSign()) || !sign.equals(dataFlow.getReqSign().toLowerCase())) {
                throw new NoAuthorityException(ResponseConstant.RESULT_CODE_NO_AUTHORITY_ERROR, "签名失败");
            }
        }
//        if (!StringUtil.isNullOrNone(dataFlow.getAppRoutes().get(0).getSecurityCode())) {
//            String sign = AuthenticationFactory.apiDataFlowMd5(dataFlow);
//            if (StringUtil.isEmpty(dataFlow.getReqSign()) || !sign.equals(dataFlow.getReqSign().toLowerCase())) {
//                throw new NoAuthorityException(ResponseConstant.RESULT_CODE_NO_AUTHORITY_ERROR, "签名失败");
//            }
//        }
        if (StringUtil.isNullOrNone(dataFlow.getRequestTime()) || !DateUtil.judgeDate(dataFlow.getRequestTime(), DateUtil.DATE_FORMATE_STRING_DEFAULT)) {
            //添加耗时
@@ -426,7 +426,7 @@
        ResponseEntity responseEntity = null;
        //配置c_service 时请注意 如果是以out 开头的调用外部的地址
        RestTemplate restTemplate ;
        RestTemplate restTemplate;
        if (Environment.isStartBootWay()) {
            restTemplate = ApplicationContextFactory.getBean("outRestTemplate", RestTemplate.class);
        } else {
@@ -444,8 +444,9 @@
                        requestUrl = service.getUrl() + "?" + param;
                    }
                }
                requestUrl = BootReplaceUtil.replaceServiceName(requestUrl);
                if (Environment.isStartBootWay()) {
                    requestUrl = BootReplaceUtil.replaceServiceName(requestUrl);
                }
                responseEntity = restTemplate.exchange(requestUrl, HttpMethod.GET, httpEntity, String.class);
            } else if (CommonConstant.HTTP_METHOD_PUT.equals(service.getMethod())) {
@@ -491,7 +492,7 @@
        //String requestUrl = "http://127.0.0.1:8008" + serviceCode;
        String requestUrl = serviceCode;
        RestTemplate restTemplate ;
        RestTemplate restTemplate;
        if (Environment.isStartBootWay()) {
            requestUrl = Environment.BOOT_PATH + requestUrl;
            restTemplate = ApplicationContextFactory.getBean("outRestTemplate", RestTemplate.class);
@@ -565,6 +566,7 @@
    /**
     * 开始调度微服务
     *
     * @param appService
     * @param dataFlow
     * @param reqJson
@@ -574,7 +576,7 @@
        HttpHeaders header = new HttpHeaders();
        //todo 对头信息重新包装
        for (String key : dataFlow.getRequestCurrentHeaders().keySet()) {
            if("userName".equals(key) || "user-name".equals(key)){
            if ("userName".equals(key) || "user-name".equals(key)) {
                header.add(key, "-");
                continue;
            }
@@ -665,7 +667,7 @@
    private void saveLogMessage(String requestJson, String responseJson) {
        try {
            if (MappingConstant.VALUE_ON.equals(MappingCache.getValue(MappingConstant.DOMAIN_SYSTEM_SWITCH,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);
@@ -683,7 +685,7 @@
     */
    private void saveCostTimeLogMessage(DataFlow dataFlow) {
        try {
            if (MappingConstant.VALUE_ON.equals(MappingCache.getValue(MappingConstant.DOMAIN_SYSTEM_SWITCH,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();