From 1879402a33f2bdaf6ac8f13a3ef67ed5bc2bc4fd Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期四, 17 七月 2025 18:20:34 +0800 Subject: [PATCH] 修改监管上传bug --- ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/model/V3.java | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/model/V3.java b/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/model/V3.java index b08ca9d..68aa7ec 100644 --- a/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/model/V3.java +++ b/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/model/V3.java @@ -61,12 +61,15 @@ certStream = new FileInputStream(this.privateKeyPath); certData = IOUtils.toByteArray(certStream); } catch (IOException e) { + e.printStackTrace(); throw new RuntimeException("私钥文件未找到"); }finally { - try { - certStream.close(); - } catch (IOException e) { - log.error("私钥流关闭异常"); + if(null != certStream){ + try { + certStream.close(); + } catch (IOException e) { + log.error("私钥流关闭异常"); + } } } return new ByteArrayInputStream(certData); -- Gitblit v1.7.1