From 829df8804bd416ffe8cd8abbdfbb79221ecef71a Mon Sep 17 00:00:00 2001 From: Wong <1960779692@qq.com> Date: Sat, 2 Apr 2022 13:22:46 +0000 Subject: [PATCH] =?UTF-8?q?:art:=20=E3=80=90=E4=BC=81=E4=B8=9A=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E3=80=91=E9=85=8D=E7=BD=AE=E7=B1=BB=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E4=BC=9A=E8=AF=9D=E5=AD=98=E6=A1=A3=E8=B7=AF=E5=BE=84=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../storage/AbstractWxCpConfigStorageConfiguration.java | 8 +++++++- .../weixin/cp/config/impl/WxCpDefaultConfigImpl.java | 9 +++++++++ weixin-java-cp/src/test/resources/test-config.sample.xml | 2 ++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/spring-boot-starters/wx-java-cp-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/cp/storage/AbstractWxCpConfigStorageConfiguration.java b/spring-boot-starters/wx-java-cp-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/cp/storage/AbstractWxCpConfigStorageConfiguration.java index 17e940928..cfcb16fe0 100644 --- a/spring-boot-starters/wx-java-cp-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/cp/storage/AbstractWxCpConfigStorageConfiguration.java +++ b/spring-boot-starters/wx-java-cp-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/cp/storage/AbstractWxCpConfigStorageConfiguration.java @@ -7,7 +7,7 @@ import org.apache.commons.lang3.StringUtils; /** * WxCpConfigStorage 抽象配置类 * - * @author yl + * @author yl & Wang_Wong * @date 2021/12/6 */ public abstract class AbstractWxCpConfigStorageConfiguration { @@ -18,6 +18,8 @@ public abstract class AbstractWxCpConfigStorageConfiguration { String token = properties.getToken(); Integer agentId = properties.getAgentId(); String aesKey = properties.getAesKey(); + // 企业微信,会话存档路径 + String msgAuditLibPath = properties.getMsgAuditLibPath(); config.setCorpId(corpId); config.setCorpSecret(corpSecret); @@ -30,6 +32,9 @@ public abstract class AbstractWxCpConfigStorageConfiguration { if (StringUtils.isNotBlank(aesKey)) { config.setAesKey(aesKey); } + if (StringUtils.isNotBlank(msgAuditLibPath)) { + config.setMsgAuditLibPath(msgAuditLibPath); + } WxCpProperties.ConfigStorage storage = properties.getConfigStorage(); String httpProxyHost = storage.getHttpProxyHost(); @@ -50,4 +55,5 @@ public abstract class AbstractWxCpConfigStorageConfiguration { } return config; } + } diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpDefaultConfigImpl.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpDefaultConfigImpl.java index b7304628a..c716eb735 100644 --- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpDefaultConfigImpl.java +++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpDefaultConfigImpl.java @@ -285,6 +285,15 @@ public class WxCpDefaultConfigImpl implements WxCpConfigStorage, Serializable { this.agentId = agentId; } + /** + * 设置企微会话存档路径. + * + * @param msgAuditLibPath 会话存档具体路径 + */ + public void setMsgAuditLibPath(String msgAuditLibPath) { + this.msgAuditLibPath = msgAuditLibPath; + } + @Override public String getOauth2redirectUri() { return this.oauth2redirectUri; diff --git a/weixin-java-cp/src/test/resources/test-config.sample.xml b/weixin-java-cp/src/test/resources/test-config.sample.xml index 76a74a25a..23e83e942 100644 --- a/weixin-java-cp/src/test/resources/test-config.sample.xml +++ b/weixin-java-cp/src/test/resources/test-config.sample.xml @@ -11,4 +11,6 @@ 企业号通讯录里的某个tagid 网页授权获取用户信息回调地址 webhook链接地址的key值 + + /www/osfile/libcrypto-1_1-x64.dll,libssl-1_1-x64.dll,libcurl-x64.dll,WeWorkFinanceSdk.dll,libWeWorkFinanceSdk_Java.so