mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-10-26 10:49:24 +08:00
修改公众号文字变成企业号
This commit is contained in:
@@ -41,9 +41,9 @@ weixin-java-tools
|
||||
## Hello World
|
||||
```java
|
||||
WxConfigStorage config = new WxInMemoryConfigStorage();
|
||||
config.setAppId(...); // 设置微信公众号的appid
|
||||
config.setSecret(...); // 设置微信公众号的app corpSecret
|
||||
config.setToken(...); // 设置微信公众号的token
|
||||
config.setAppId(...); // 设置微信企业号的appid
|
||||
config.setSecret(...); // 设置微信企业号的app corpSecret
|
||||
config.setToken(...); // 设置微信企业号的token
|
||||
|
||||
WxServiceImpl wxService = new WxServiceImpl();
|
||||
wxService.setWxConfigStorage(config);
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.util.List;
|
||||
import me.chanjar.weixin.enterprise.util.json.WxCpGsonBuilder;
|
||||
|
||||
/**
|
||||
* 公众号菜单
|
||||
* 企业号菜单
|
||||
* @author Daniel Qian
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -51,7 +51,7 @@ public class WxCryptUtilTest {
|
||||
|
||||
String messageText = String.format(xmlFormat, cipherText);
|
||||
|
||||
// 第三方收到公众号平台发送的消息
|
||||
// 第三方收到企业号平台发送的消息
|
||||
String plainMessage = pc.decrypt(cipherText);
|
||||
|
||||
System.out.println(plainMessage);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<corpSecret>企业号corpsecret</corpSecret>
|
||||
<agentId>企业号应用id</agentId>
|
||||
<token>企业号应用Token</token>
|
||||
<aesKey>公众号应用EncodingAESKey</aesKey>
|
||||
<aesKey>企业号应用EncodingAESKey</aesKey>
|
||||
<accessToken>可以不填写</accessToken>
|
||||
<expiresIn>可以不填写</expiresIn>
|
||||
<userId>企业号通讯录里的某个userid</userId>
|
||||
|
||||
Reference in New Issue
Block a user