change name: matchrule to matchRule

This commit is contained in:
Tianmu 2015-12-22 10:45:15 +08:00
parent 8d87609c0b
commit 6b522da559
3 changed files with 9 additions and 9 deletions

View File

@ -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;
@ -29,12 +29,12 @@ public class WxMenu implements Serializable {
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() {

View File

@ -39,9 +39,9 @@ public class WxMenuGsonAdapter implements JsonSerializer<WxMenu>, JsonDeserializ
}
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;

View File

@ -230,7 +230,7 @@ public class WxMpServiceImpl implements WxMpService {
}
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 {