YYC
2024-12-23 3697ca81ae651e6087706668744f5b67535f9f40
src/main/java/com/fzzy/push/shjdjw2023/Shjdjw2023HttpClientUtil.java
@@ -32,7 +32,7 @@
        HttpURLConnection connection = null;
        OutputStream outputStream = null;
        String rs = "";
        ShjdjwRespDto responseDto;
        ShjdjwRespDto responseDto = null;
        try {
            connection = (HttpURLConnection) urls.openConnection();
            connection.setRequestProperty("Content-Type", "application/json;charset=UTF-8");
@@ -68,15 +68,17 @@
                rs = null;
                return new ShjdjwRespDto(99,e.getMessage());
            }
            log.info("---------接口返回:" + rs +"---------");
            if(StringUtils.isEmpty(rs)){
            if(StringUtils.isNotEmpty(rs)){
                rs = rs.replaceAll("\"", "");
                log.info("---------接口返回,秘文:" + rs +"---------");
                rs = AESUtils.decrypt(rs, apiConfs.getPublicKey());
                log.info("---------接口返回,解析后:" + rs +"---------");
                responseDto = JSON.parseObject(rs, ShjdjwRespDto.class);
            }
            if(responseDto == null )  {
                return new ShjdjwRespDto(99,"接口请求发生未知错误");
            }
            if("dDTJ5xGqsmo32r40WKKPOLW6ORtH3mwMyv4YaJNzc4g=".equals(rs)){
                return new ShjdjwRespDto(1,"上报成功");
            }
//            responseDto = JSON.parseObject(rs, ShjdjwRespDto.class);
            return new ShjdjwRespDto(1,"上报成功");
            return responseDto;
        } finally {
            try {
                outputStream.close();