From a85b63f3e4d933df586714ea91c69a3fd5d16b99 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期五, 06 十二月 2024 11:56:07 +0800
Subject: [PATCH] 合作商权限
---
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