From d7fb76fa0d153cb570ae816cb5f45a780bf0f48f Mon Sep 17 00:00:00 2001
From: jiangqs <jiangqs>
Date: 星期五, 01 九月 2023 19:19:30 +0800
Subject: [PATCH] bug

---
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/config/WxCpConfiguration.java |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/config/WxCpConfiguration.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/config/WxCpConfiguration.java
index 4dedcc4..26c967c 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/config/WxCpConfiguration.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/config/WxCpConfiguration.java
@@ -34,18 +34,18 @@
         wxCpConfigStorage.setCorpId(properties.getCorpId());
         wxCpConfigStorage.setAgentId(properties.getAgentId());
         wxCpConfigStorage.setCorpSecret(properties.getAgentSecret());
-
+        wxCpConfigStorage.setAesKey(properties.getEncodingAESKey());
+        wxCpConfigStorage.setToken(properties.getToken());
         WxCpService wxService = new WxCpServiceImpl();
         wxService.setWxCpConfigStorage(wxCpConfigStorage);
-
         return wxService;
     }
 
+
     @Bean
+    @ConditionalOnMissingBean
     public WxCryptUtil wxCryptUtil() {
-
-        WxCryptUtil wxCryptUtil = new WxCryptUtil("", "", properties.getCorpId());
-
+        WxCryptUtil wxCryptUtil = new WxCryptUtil(properties.getToken(), properties.getEncodingAESKey(), properties.getCorpId());
         return wxCryptUtil;
     }
 }

--
Gitblit v1.7.1