Skip to content

Commit 57a6ef1

Browse files
qw8881569Binary Wang
authored andcommitted
🆕 【小程序】增加小程序基本信息通知事件相关的属性
1 parent 4754a56 commit 57a6ef1

File tree

1 file changed

+48
-1
lines changed

1 file changed

+48
-1
lines changed

weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/WxMaMessage.java

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,51 @@ public class WxMaMessage implements Serializable {
212212
@XStreamAlias("SubscribeMsgSentEvent")
213213
private WxMaSubscribeMsgEvent.SubscribeMsgSentEvent subscribeMsgSentEvent;
214214

215+
// 小程序基本信息
216+
217+
//region 小程序基本信息 infoType=notify_3rd_wxa_auth_and_icp
218+
219+
/**
220+
* 返回值
221+
*/
222+
@XStreamAlias("ret")
223+
private String ret;
224+
225+
/**
226+
* 一级类目id
227+
*/
228+
@XStreamAlias("first")
229+
private String first;
230+
231+
/**
232+
* 二级类目id
233+
*/
234+
@XStreamAlias("second")
235+
private String second;
236+
237+
/**
238+
* 驳回原因
239+
*/
240+
@XStreamAlias("reason")
241+
private String reason;
242+
243+
/**
244+
* 小程序代码审核驳回原因
245+
*/
246+
@XStreamAlias("Reason")
247+
private String weAppReason;
248+
249+
/**
250+
* 昵称
251+
*/
252+
@XStreamAlias("nickname")
253+
private String nickname;
254+
255+
/**
256+
* 原始通知内容
257+
*/
258+
private String context;
259+
215260
/**
216261
* 不要直接使用这个字段,
217262
* 这个字段只是为了适配 SubscribeMsgPopupEvent SubscribeMsgChangeEvent SubscribeMsgSentEvent
@@ -261,7 +306,9 @@ public static WxMaMessage fromEncryptedXml(String encryptedXml,
261306
WxMaConfig wxMaConfig, String timestamp, String nonce,
262307
String msgSignature) {
263308
String plainText = new WxMaCryptUtils(wxMaConfig).decryptXml(msgSignature, timestamp, nonce, encryptedXml);
264-
return fromXml(plainText);
309+
WxMaMessage wxMaMessage = fromXml(plainText);
310+
wxMaMessage.setContext(plainText);
311+
return wxMaMessage;
265312
}
266313

267314
public static WxMaMessage fromEncryptedXml(InputStream is, WxMaConfig wxMaConfig, String timestamp,

0 commit comments

Comments
 (0)