Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【企业微信】 增加直播回调事件常量支持 #2777

Merged
merged 1 commit into from
Aug 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ public static class EventType {
*/
public static final String MSGAUDIT_NOTIFY = "msgaudit_notify";

/**
* 直播回调事件
*/
public static final String LIVING_STATUS_CHANGE = "living_status_change";

}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import me.chanjar.weixin.cp.bean.living.*;
import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage;
import me.chanjar.weixin.cp.config.WxCpConfigStorage;
import me.chanjar.weixin.cp.constant.WxCpConsts;
import me.chanjar.weixin.cp.demo.WxCpDemoInMemoryConfigStorage;
import me.chanjar.weixin.cp.util.xml.XStreamTransformer;
import org.eclipse.jetty.util.ajax.JSON;
Expand Down Expand Up @@ -64,6 +65,12 @@ public void test() throws WxErrorException {
livingXmlMsg.setAllFieldsMap(XmlUtils.xml2Map(livingXml));
log.info("livingXmlMsg:{}", JSON.toString(livingXmlMsg));

/**
* 直播回调事件常量
* https://developer.work.weixin.qq.com/document/path/94145
*/
String livingStatusChange = WxCpConsts.EventType.LIVING_STATUS_CHANGE;


/**
* 测试创建直播
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public void test() throws Exception {
* <aesKey></aesKey> // 回调配置的EncodingAESKey
*
* // 企业微信会话存档
* // 1、会话存档私钥,一定要加上前缀!
* // 1、会话存档私钥,最好去除前缀和换行,如下所示
* // 2、仔细配置windows以及linux环境sdk路径
* <msgAuditPriKey>MIxxx893B2pggd1r95T8k2QxxxxbD6xxxxmXsskn+5XunyR1WJlJGqgi0OMVGYvSfkNb9kD50fM21CGLcN1y4miL9fVNBIsvJmIUeJCNS8TioAVGFvh2EgzjqTR1gH</msgAuditPriKey>
* <msgAuditLibPath>/www/osfile/libcrypto-1_1-x64.dll,libssl-1_1-x64.dll,libcurl-x64.dll,WeWorkFinanceSdk.dll,libWeWorkFinanceSdk_Java.so</msgAuditLibPath>
Expand All @@ -131,6 +131,17 @@ public void test() throws Exception {
* secret: xIpum7Yt4NMXcyxdzcQ2l_46BG4Qxxxxxxxxxxx
* token:
* aesKey:
* msgAuditPriKey: MIxxx893B2pggd1r95T8k2QxxxxbD6xxxxmXsskn+5XunyR1WJlJGqgi0OMVGYvSfkNb9kD50fM21CGLcN1y4miL9fVNBIsvJmIUeJCNS8TioAVGFvh2EgzjqTR1gHxxx
* msgAuditLibPath: /www/osfile/libcrypto-1_1-x64.dll,libssl-1_1-x64.dll,libcurl-x64.dll,WeWorkFinanceSdk.dll,libWeWorkFinanceSdk_Java.so
*
*
* 在线生成非对称加密公钥私钥对:
* http://web.chacuo.net/netrsakeypair
*
*
* 或者可以在linux上使用如下命令生成公钥私钥对:
* openssl genrsa -out private_key.pem 2048
* openssl rsa -in private_key.pem -pubout -out public_key.pem
* /

/**
Expand Down Expand Up @@ -262,7 +273,7 @@ public void test() throws Exception {
}
}
// 注意:
// 当此批次数据拉取完毕后,可以释放此次sdk
// 当此批次数据拉取完毕后,应释放此次sdk
log.info("释放sdk {}", chatDatas.getSdk());
Finance.DestroySdk(chatDatas.getSdk());

Expand Down