Skip to content

Commit 829df88

Browse files
0katekate0binarywang
authored andcommitted
🎨 【企业微信】配置类增加会话存档路径设置
1 parent a6b0b9c commit 829df88

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

spring-boot-starters/wx-java-cp-spring-boot-starter/src/main/java/com/binarywang/spring/starter/wxjava/cp/storage/AbstractWxCpConfigStorageConfiguration.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/**
88
* WxCpConfigStorage 抽象配置类
99
*
10-
* @author yl
10+
* @author yl & Wang_Wong
1111
* @date 2021/12/6
1212
*/
1313
public abstract class AbstractWxCpConfigStorageConfiguration {
@@ -18,6 +18,8 @@ protected WxCpDefaultConfigImpl config(WxCpDefaultConfigImpl config, WxCpPropert
1818
String token = properties.getToken();
1919
Integer agentId = properties.getAgentId();
2020
String aesKey = properties.getAesKey();
21+
// 企业微信,会话存档路径
22+
String msgAuditLibPath = properties.getMsgAuditLibPath();
2123

2224
config.setCorpId(corpId);
2325
config.setCorpSecret(corpSecret);
@@ -30,6 +32,9 @@ protected WxCpDefaultConfigImpl config(WxCpDefaultConfigImpl config, WxCpPropert
3032
if (StringUtils.isNotBlank(aesKey)) {
3133
config.setAesKey(aesKey);
3234
}
35+
if (StringUtils.isNotBlank(msgAuditLibPath)) {
36+
config.setMsgAuditLibPath(msgAuditLibPath);
37+
}
3338

3439
WxCpProperties.ConfigStorage storage = properties.getConfigStorage();
3540
String httpProxyHost = storage.getHttpProxyHost();
@@ -50,4 +55,5 @@ protected WxCpDefaultConfigImpl config(WxCpDefaultConfigImpl config, WxCpPropert
5055
}
5156
return config;
5257
}
58+
5359
}

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/config/impl/WxCpDefaultConfigImpl.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,15 @@ public void setAgentId(Integer agentId) {
285285
this.agentId = agentId;
286286
}
287287

288+
/**
289+
* 设置企微会话存档路径.
290+
*
291+
* @param msgAuditLibPath 会话存档具体路径
292+
*/
293+
public void setMsgAuditLibPath(String msgAuditLibPath) {
294+
this.msgAuditLibPath = msgAuditLibPath;
295+
}
296+
288297
@Override
289298
public String getOauth2redirectUri() {
290299
return this.oauth2redirectUri;

weixin-java-cp/src/test/resources/test-config.sample.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,6 @@
1111
<tagId>企业号通讯录里的某个tagid</tagId>
1212
<oauth2redirectUri>网页授权获取用户信息回调地址</oauth2redirectUri>
1313
<webhookKey>webhook链接地址的key值</webhookKey>
14+
<!-- 企业微信会话存档,windows以及linux环境sdk路径 -->
15+
<msgAuditLibPath>/www/osfile/libcrypto-1_1-x64.dll,libssl-1_1-x64.dll,libcurl-x64.dll,WeWorkFinanceSdk.dll,libWeWorkFinanceSdk_Java.so</msgAuditLibPath>
1416
</xml>

0 commit comments

Comments
 (0)