修改代码格式使用两个空格

This commit is contained in:
aimil 2016-08-31 17:33:09 +08:00
parent 5525c4fa27
commit 4047f6dbd6
4 changed files with 369 additions and 384 deletions

View File

@ -12,7 +12,6 @@ import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
/** /**
* 微信用户信息 * 微信用户信息
*
* @author chanjarster * @author chanjarster
* *
*/ */
@ -40,91 +39,69 @@ public class WxMpUser implements Serializable {
public Boolean getSubscribe() { public Boolean getSubscribe() {
return subscribe; return subscribe;
} }
public Boolean isSubscribe() { public Boolean isSubscribe() {
return subscribe; return subscribe;
} }
public void setSubscribe(Boolean subscribe) { public void setSubscribe(Boolean subscribe) {
this.subscribe = subscribe; this.subscribe = subscribe;
} }
public String getOpenId() { public String getOpenId() {
return openId; return openId;
} }
public void setOpenId(String openId) { public void setOpenId(String openId) {
this.openId = openId; this.openId = openId;
} }
public String getNickname() { public String getNickname() {
return nickname; return nickname;
} }
public void setNickname(String nickname) { public void setNickname(String nickname) {
this.nickname = nickname; this.nickname = nickname;
} }
public String getSex() { public String getSex() {
return sex; return sex;
} }
public void setSex(String sex) { public void setSex(String sex) {
this.sex = sex; this.sex = sex;
} }
public String getLanguage() { public String getLanguage() {
return language; return language;
} }
public void setLanguage(String language) { public void setLanguage(String language) {
this.language = language; this.language = language;
} }
public String getCity() { public String getCity() {
return city; return city;
} }
public void setCity(String city) { public void setCity(String city) {
this.city = city; this.city = city;
} }
public String getProvince() { public String getProvince() {
return province; return province;
} }
public void setProvince(String province) { public void setProvince(String province) {
this.province = province; this.province = province;
} }
public String getCountry() { public String getCountry() {
return country; return country;
} }
public void setCountry(String country) { public void setCountry(String country) {
this.country = country; this.country = country;
} }
public String getHeadImgUrl() { public String getHeadImgUrl() {
return headImgUrl; return headImgUrl;
} }
public void setHeadImgUrl(String headImgUrl) { public void setHeadImgUrl(String headImgUrl) {
this.headImgUrl = headImgUrl; this.headImgUrl = headImgUrl;
} }
public Long getSubscribeTime() { public Long getSubscribeTime() {
return subscribeTime; return subscribeTime;
} }
public void setSubscribeTime(Long subscribeTime) { public void setSubscribeTime(Long subscribeTime) {
this.subscribeTime = subscribeTime; this.subscribeTime = subscribeTime;
} }
public String getUnionId() { public String getUnionId() {
return unionId; return unionId;
} }
public void setUnionId(String unionId) { public void setUnionId(String unionId) {
this.unionId = unionId; this.unionId = unionId;
} }
@ -141,15 +118,12 @@ public class WxMpUser implements Serializable {
public String getRemark() { public String getRemark() {
return remark; return remark;
} }
public void setRemark(String remark) { public void setRemark(String remark) {
this.remark = remark; this.remark = remark;
} }
public Integer getGroupId() { public Integer getGroupId() {
return groupId; return groupId;
} }
public void setGroupId(Integer groupId) { public void setGroupId(Integer groupId) {
this.groupId = groupId; this.groupId = groupId;
} }
@ -159,8 +133,7 @@ public class WxMpUser implements Serializable {
} }
public static List<WxMpUser> fromJsonList(String json) { public static List<WxMpUser> fromJsonList(String json) {
Type collectionType = new TypeToken<List<WxMpUser>>() { Type collectionType = new TypeToken<List<WxMpUser>>() {}.getType();
}.getType();
Gson gson = WxMpGsonBuilder.INSTANCE.create(); Gson gson = WxMpGsonBuilder.INSTANCE.create();
JsonObject jsonObject = gson.fromJson(json, JsonObject.class); JsonObject jsonObject = gson.fromJson(json, JsonObject.class);
return gson.fromJson(jsonObject.get("user_info_list"), collectionType); return gson.fromJson(jsonObject.get("user_info_list"), collectionType);
@ -168,8 +141,20 @@ public class WxMpUser implements Serializable {
@Override @Override
public String toString() { public String toString() {
return "WxMpUser{" + "subscribe=" + subscribe + ", openId='" + openId + '\'' + ", nickname='" + nickname + '\'' + ", sex='" + sex + '\'' + ", language='" + language + '\'' return "WxMpUser{" +
+ ", city='" + city + '\'' + ", province='" + province + '\'' + ", country='" + country + '\'' + ", headImgUrl='" + headImgUrl + '\'' + ", subscribeTime=" + subscribeTime "subscribe=" + subscribe +
+ ", unionId='" + unionId + '\'' + ", remark='" + remark + '\'' + ", groupId='" + groupId + '\'' + '}'; ", openId='" + openId + '\'' +
", nickname='" + nickname + '\'' +
", sex='" + sex + '\'' +
", language='" + language + '\'' +
", city='" + city + '\'' +
", province='" + province + '\'' +
", country='" + country + '\'' +
", headImgUrl='" + headImgUrl + '\'' +
", subscribeTime=" + subscribeTime +
", unionId='" + unionId + '\'' +
", remark='" + remark + '\'' +
", groupId='" + groupId + '\'' +
'}';
} }
} }