🎨 【企业微信】配置类增加会话存档路径设置

This commit is contained in:
Wong 2022-04-02 13:22:46 +00:00 committed by binarywang
parent a6b0b9c191
commit 829df8804b
3 changed files with 18 additions and 1 deletions

View File

@ -7,7 +7,7 @@ import org.apache.commons.lang3.StringUtils;
/** /**
* WxCpConfigStorage 抽象配置类 * WxCpConfigStorage 抽象配置类
* *
* @author yl * @author yl & Wang_Wong
* @date 2021/12/6 * @date 2021/12/6
*/ */
public abstract class AbstractWxCpConfigStorageConfiguration { public abstract class AbstractWxCpConfigStorageConfiguration {
@ -18,6 +18,8 @@ public abstract class AbstractWxCpConfigStorageConfiguration {
String token = properties.getToken(); String token = properties.getToken();
Integer agentId = properties.getAgentId(); Integer agentId = properties.getAgentId();
String aesKey = properties.getAesKey(); String aesKey = properties.getAesKey();
// 企业微信,会话存档路径
String msgAuditLibPath = properties.getMsgAuditLibPath();
config.setCorpId(corpId); config.setCorpId(corpId);
config.setCorpSecret(corpSecret); config.setCorpSecret(corpSecret);
@ -30,6 +32,9 @@ public abstract class AbstractWxCpConfigStorageConfiguration {
if (StringUtils.isNotBlank(aesKey)) { if (StringUtils.isNotBlank(aesKey)) {
config.setAesKey(aesKey); config.setAesKey(aesKey);
} }
if (StringUtils.isNotBlank(msgAuditLibPath)) {
config.setMsgAuditLibPath(msgAuditLibPath);
}
WxCpProperties.ConfigStorage storage = properties.getConfigStorage(); WxCpProperties.ConfigStorage storage = properties.getConfigStorage();
String httpProxyHost = storage.getHttpProxyHost(); String httpProxyHost = storage.getHttpProxyHost();
@ -50,4 +55,5 @@ public abstract class AbstractWxCpConfigStorageConfiguration {
} }
return config; return config;
} }
} }

View File

@ -285,6 +285,15 @@ public class WxCpDefaultConfigImpl implements WxCpConfigStorage, Serializable {
this.agentId = agentId; this.agentId = agentId;
} }
/**
* 设置企微会话存档路径.
*
* @param msgAuditLibPath 会话存档具体路径
*/
public void setMsgAuditLibPath(String msgAuditLibPath) {
this.msgAuditLibPath = msgAuditLibPath;
}
@Override @Override
public String getOauth2redirectUri() { public String getOauth2redirectUri() {
return this.oauth2redirectUri; return this.oauth2redirectUri;

View File

@ -11,4 +11,6 @@
<tagId>企业号通讯录里的某个tagid</tagId> <tagId>企业号通讯录里的某个tagid</tagId>
<oauth2redirectUri>网页授权获取用户信息回调地址</oauth2redirectUri> <oauth2redirectUri>网页授权获取用户信息回调地址</oauth2redirectUri>
<webhookKey>webhook链接地址的key值</webhookKey> <webhookKey>webhook链接地址的key值</webhookKey>
<!-- 企业微信会话存档,windows以及linux环境sdk路径 -->
<msgAuditLibPath>/www/osfile/libcrypto-1_1-x64.dll,libssl-1_1-x64.dll,libcurl-x64.dll,WeWorkFinanceSdk.dll,libWeWorkFinanceSdk_Java.so</msgAuditLibPath>
</xml> </xml>