File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,12 @@ public static WxCpMessageSendResult fromJson(String json) {
4747 @ SerializedName ("msgid" )
4848 private String msgId ;
4949
50+ /**
51+ * 仅消息类型为“按钮交互型”,“投票选择型”和“多项选择型”的模板卡片消息返回,应用可使用response_code调用更新模版卡片消息接口,24小时内有效,且只能使用一次
52+ */
53+ @ SerializedName ("response_code" )
54+ private String responseCode ;
55+
5056 public List <String > getInvalidUserList () {
5157 return this .content2List (this .invalidUser );
5258 }
Original file line number Diff line number Diff line change @@ -34,6 +34,18 @@ public class TemplateCardButton implements Serializable {
3434 */
3535 private String key ;
3636
37+ /**
38+ * 按钮点击事件类型,0 或不填代表回调点击事件,1 代表跳转url
39+ */
40+ private int type ;
41+
42+ /**
43+ * 跳转事件的url,button_list.type是1时必填
44+ */
45+ private String url ;
46+
47+
48+
3749 public JsonObject toJson () {
3850 JsonObject btnObject = new JsonObject ();
3951
@@ -44,6 +56,10 @@ public JsonObject toJson() {
4456 btnObject .addProperty ("style" , this .getStyle ());
4557 }
4658 btnObject .addProperty ("key" , this .getKey ());
59+ btnObject .addProperty ("type" , this .getType ());
60+ if (null != this .getUrl ()) {
61+ btnObject .addProperty ("url" , this .getUrl ());
62+ }
4763 return btnObject ;
4864 }
4965}
You can’t perform that action at this time.
0 commit comments