Skip to content

Commit

Permalink
change name: matchrule to matchRule
Browse files Browse the repository at this point in the history
  • Loading branch information
tianmu committed Dec 22, 2015
1 parent 8d87609 commit 6b522da
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class WxMenu implements Serializable {

private List<WxMenuButton> buttons = new ArrayList<WxMenuButton>();

private WxMenuRule matchrule;
private WxMenuRule matchRule;

public List<WxMenuButton> getButtons() {
return buttons;
Expand All @@ -29,12 +29,12 @@ public void setButtons(List<WxMenuButton> buttons) {
this.buttons = buttons;
}

public WxMenuRule getMatchrule() {
return matchrule;
public WxMenuRule getMatchRule() {
return matchRule;
}

public void setMatchrule(WxMenuRule matchrule) {
this.matchrule = matchrule;
public void setMatchRule(WxMenuRule matchRule) {
this.matchRule = matchRule;
}

public String toJson() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ public JsonElement serialize(WxMenu menu, Type typeOfSrc, JsonSerializationConte
}
json.add("button", buttonArray);

if (menu.getMatchrule() != null) {
Gson gson = new Gson();
json.add("matchrule", gson.toJsonTree(menu.getMatchrule()));
if (menu.getMatchRule() != null) {
Gson gson = new Gson();
json.add("matchrule", gson.toJsonTree(menu.getMatchRule()));
}

return json;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public void customMessageSend(WxMpCustomMessage message) throws WxErrorException
}

public void menuCreate(WxMenu menu) throws WxErrorException {
if (menu.getMatchrule() != null) {
if (menu.getMatchRule() != null) {
String url = "https://api.weixin.qq.com/cgi-bin/menu/addconditional";
execute(new SimplePostRequestExecutor(), url, menu.toJson());
} else {
Expand Down

0 comments on commit 6b522da

Please sign in to comment.