🎨 WxMaMessage.allFieldsMap支持json格式数据存放

This commit is contained in:
zhongjq 2025-03-06 20:56:12 +08:00 committed by GitHub
parent 1f0dbcc2aa
commit 03790d64bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -31,7 +31,7 @@ public class WxMaMessage implements Serializable {
private static final long serialVersionUID = -3586245291677274914L; private static final long serialVersionUID = -3586245291677274914L;
/** /**
* 使用dom4j解析的存放所有xml属性和值的map. * 使用dom4j解析的存放所有xml或json属性和值的map.
*/ */
private Map<String, Object> allFieldsMap; private Map<String, Object> allFieldsMap;
@ -287,6 +287,7 @@ public class WxMaMessage implements Serializable {
} }
message.setUselessMsg(null); message.setUselessMsg(null);
} }
message.setAllFieldsMap(WxMaGsonBuilder.create().fromJson(json, Map.class));
return message; return message;
} }