🎨 #3639 【小程序】修复多账号starter不支持设置数据格式,导致消息解析出错的问题

This commit is contained in:
Ryn 2025-07-16 13:44:50 +08:00 committed by GitHub
parent d4cf48d059
commit 3e4ee57e1c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 6 deletions

View File

@ -108,12 +108,12 @@ public abstract class AbstractWxMaConfiguration {
return wxMaService; return wxMaService;
} }
private void configApp(WxMaDefaultConfigImpl config, WxMaSingleProperties corpProperties) { private void configApp(WxMaDefaultConfigImpl config, WxMaSingleProperties properties) {
String appId = corpProperties.getAppId(); String appId = properties.getAppId();
String appSecret = corpProperties.getAppSecret(); String appSecret = properties.getAppSecret();
String token = corpProperties.getToken(); String token = properties.getToken();
String aesKey = corpProperties.getAesKey(); String aesKey = properties.getAesKey();
boolean useStableAccessToken = corpProperties.isUseStableAccessToken(); boolean useStableAccessToken = properties.isUseStableAccessToken();
config.setAppid(appId); config.setAppid(appId);
config.setSecret(appSecret); config.setSecret(appSecret);
@ -123,6 +123,7 @@ public abstract class AbstractWxMaConfiguration {
if (StringUtils.isNotBlank(aesKey)) { if (StringUtils.isNotBlank(aesKey)) {
config.setAesKey(aesKey); config.setAesKey(aesKey);
} }
config.setMsgDataFormat(properties.getMsgDataFormat());
config.useStableAccessToken(useStableAccessToken); config.useStableAccessToken(useStableAccessToken);
} }

View File

@ -33,6 +33,11 @@ public class WxMaSingleProperties implements Serializable {
*/ */
private String aesKey; private String aesKey;
/**
* 消息格式XML或者JSON.
*/
private String msgDataFormat;
/** /**
* 是否使用稳定版 Access Token * 是否使用稳定版 Access Token
*/ */