🎨 #3395【企业微信】增加"模板卡片事件推送"事件的相关属性
This commit is contained in:
@@ -187,6 +187,17 @@ public class WxCpXmlMessage implements Serializable {
|
||||
@XStreamConverter(value = XStreamCDataConverter.class)
|
||||
private String taskId;
|
||||
|
||||
@XStreamAlias("CardType")
|
||||
@XStreamConverter(value = XStreamCDataConverter.class)
|
||||
private String cardType;
|
||||
|
||||
@XStreamAlias("ResponseCode")
|
||||
@XStreamConverter(value = XStreamCDataConverter.class)
|
||||
private String responseCode;
|
||||
|
||||
@XStreamAlias("SelectedItems")
|
||||
private List<SelectedItem> selectedItems;
|
||||
|
||||
/**
|
||||
* 微信客服
|
||||
* 调用拉取消息接口时,需要传此token,用于校验请求的合法性
|
||||
@@ -750,4 +761,21 @@ public class WxCpXmlMessage implements Serializable {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The type selected Items.
|
||||
*/
|
||||
@Data
|
||||
@XStreamAlias("SelectedItem")
|
||||
public static class SelectedItem implements Serializable {
|
||||
private static final long serialVersionUID = 6319921121637597406L;
|
||||
|
||||
@XStreamAlias("QuestionKey")
|
||||
@XStreamConverter(value = XStreamCDataConverter.class)
|
||||
private String questionKey;
|
||||
|
||||
@XStreamAlias(value = "OptionIds")
|
||||
private List<String> optionIds;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -48,6 +48,11 @@ public class WxCpConsts {
|
||||
*/
|
||||
public static final String CHANGE_CONTACT = "change_contact";
|
||||
|
||||
/**
|
||||
* 企业微信模板卡片事件推送
|
||||
*/
|
||||
public static final String TEMPLATE_CARD_EVENT = "template_card_event";
|
||||
|
||||
/**
|
||||
* 点击菜单拉取消息的事件推送.
|
||||
*/
|
||||
|
||||
@@ -93,6 +93,11 @@ public class XStreamTransformer {
|
||||
xstream.processAnnotations(WxCpXmlMessage.SendPicsInfo.class);
|
||||
xstream.processAnnotations(WxCpXmlMessage.SendPicsInfo.Item.class);
|
||||
xstream.processAnnotations(WxCpXmlMessage.SendLocationInfo.class);
|
||||
xstream.processAnnotations(WxCpXmlMessage.SelectedItem.class);
|
||||
// 显式允许 String 类
|
||||
xstream.allowTypes(new Class[]{String.class});
|
||||
// 模板卡片事件推送独属
|
||||
xstream.alias("OptionId",String.class);
|
||||
return xstream;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user