From bf1c28d61cd878f567897dbd52543e06c0567128 Mon Sep 17 00:00:00 2001
From: 0katekate0 <1960779692@qq.com>
Date: Fri, 12 Aug 2022 14:35:01 +0800
Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BC=81=E4=B8=9A=E5=BE=AE=E4=BF=A1?=
=?UTF-8?q?=E3=80=91=20=E5=A2=9E=E5=8A=A0=E7=9B=B4=E6=92=AD=E5=9B=9E?=
=?UTF-8?q?=E8=B0=83=E4=BA=8B=E4=BB=B6=E5=B8=B8=E9=87=8F=E6=94=AF=E6=8C=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../me/chanjar/weixin/cp/constant/WxCpConsts.java | 5 +++++
.../me/chanjar/weixin/cp/api/WxCpLivingTest.java | 7 +++++++
.../chanjar/weixin/cp/api/WxCpMsgAuditTest.java | 15 +++++++++++++--
3 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/constant/WxCpConsts.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/constant/WxCpConsts.java
index b422c9d23d..8d8f09271a 100644
--- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/constant/WxCpConsts.java
+++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/constant/WxCpConsts.java
@@ -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";
+
}
/**
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpLivingTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpLivingTest.java
index 5ee990f9b7..43724e5a0b 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpLivingTest.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpLivingTest.java
@@ -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;
@@ -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;
+
/**
* 测试创建直播
diff --git a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpMsgAuditTest.java b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpMsgAuditTest.java
index 7c3c4c9a80..27fd2b2156 100644
--- a/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpMsgAuditTest.java
+++ b/weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpMsgAuditTest.java
@@ -104,7 +104,7 @@ public void test() throws Exception {
* // 回调配置的EncodingAESKey
*
* // 企业微信会话存档
- * // 1、会话存档私钥,一定要加上前缀!!
+ * // 1、会话存档私钥,最好去除前缀和换行,如下所示!
* // 2、仔细配置windows以及linux环境sdk路径
* MIxxx893B2pggd1r95T8k2QxxxxbD6xxxxmXsskn+5XunyR1WJlJGqgi0OMVGYvSfkNb9kD50fM21CGLcN1y4miL9fVNBIsvJmIUeJCNS8TioAVGFvh2EgzjqTR1gH
* /www/osfile/libcrypto-1_1-x64.dll,libssl-1_1-x64.dll,libcurl-x64.dll,WeWorkFinanceSdk.dll,libWeWorkFinanceSdk_Java.so
@@ -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
* /
/**
@@ -262,7 +273,7 @@ public void test() throws Exception {
}
}
// 注意:
- // 当此批次数据拉取完毕后,可以释放此次sdk
+ // 当此批次数据拉取完毕后,应释放此次sdk
log.info("释放sdk {}", chatDatas.getSdk());
Finance.DestroySdk(chatDatas.getSdk());