Merge branch 'wxMenuRule' into develop

This commit is contained in:
Binary Wang 2016-06-18 22:00:22 +08:00
commit 88a7ac3693
3 changed files with 8 additions and 8 deletions

View File

@ -131,7 +131,7 @@ public class WxMenu implements Serializable {
} }
public static class WxMenuRule { public static class WxMenuRule {
private String groupId; private String tagId;
private String sex; private String sex;
private String country; private String country;
private String province; private String province;
@ -139,12 +139,12 @@ public class WxMenu implements Serializable {
private String clientPlatformType; private String clientPlatformType;
private String language; private String language;
public String getGroupId() { public String getTagId() {
return groupId; return tagId;
} }
public void setGroupId(String groupId) { public void setTagId(String tagId) {
this.groupId = groupId; this.tagId = tagId;
} }
public String getSex() { public String getSex() {
@ -198,7 +198,7 @@ public class WxMenu implements Serializable {
@Override @Override
public String toString() { public String toString() {
return "matchrule:{" + return "matchrule:{" +
"group_id='" + groupId + '\'' + "tag_id='" + tagId + '\'' +
", sex='" + sex + '\'' + ", sex='" + sex + '\'' +
", country" + country + '\'' + ", country" + country + '\'' +
", province" + province + '\'' + ", province" + province + '\'' +

View File

@ -62,7 +62,7 @@ public class WxMenuGsonAdapter implements JsonSerializer<WxMenu>, JsonDeserializ
protected JsonObject convertToJson(WxMenu.WxMenuRule menuRule){ protected JsonObject convertToJson(WxMenu.WxMenuRule menuRule){
JsonObject matchRule = new JsonObject(); JsonObject matchRule = new JsonObject();
matchRule.addProperty("group_id",menuRule.getGroupId()); matchRule.addProperty("tag_id",menuRule.getTagId());
matchRule.addProperty("sex",menuRule.getSex()); matchRule.addProperty("sex",menuRule.getSex());
matchRule.addProperty("country",menuRule.getCountry()); matchRule.addProperty("country",menuRule.getCountry());
matchRule.addProperty("province",menuRule.getProvince()); matchRule.addProperty("province",menuRule.getProvince());

View File

@ -67,7 +67,7 @@ public class WxMenuTest {
menu.getButtons().add(button1); menu.getButtons().add(button1);
WxMenu.WxMenuRule wxMenuRule = new WxMenu.WxMenuRule(); WxMenu.WxMenuRule wxMenuRule = new WxMenu.WxMenuRule();
wxMenuRule.setGroupId("2"); wxMenuRule.setTagId("2");
wxMenuRule.setSex("1"); wxMenuRule.setSex("1");
wxMenuRule.setCountry("中国"); wxMenuRule.setCountry("中国");
wxMenuRule.setProvince("广东"); wxMenuRule.setProvince("广东");