mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-05-04 20:57:47 +08:00
修改代码格式使用两个空格
This commit is contained in:
parent
5525c4fa27
commit
4047f6dbd6
@ -14,55 +14,55 @@ import me.chanjar.weixin.mp.bean.result.WxMpUserList;
|
||||
*/
|
||||
public interface WxMpUserService {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 设置用户备注名接口
|
||||
* 详情请见: http://mp.weixin.qq.com/wiki/index.php?title=设置用户备注名接口
|
||||
* </pre>
|
||||
*
|
||||
* @param openid 用户openid
|
||||
* @param remark 备注名
|
||||
*/
|
||||
void userUpdateRemark(String openid, String remark) throws WxErrorException;
|
||||
/**
|
||||
* <pre>
|
||||
* 设置用户备注名接口
|
||||
* 详情请见: http://mp.weixin.qq.com/wiki/index.php?title=设置用户备注名接口
|
||||
* </pre>
|
||||
*
|
||||
* @param openid 用户openid
|
||||
* @param remark 备注名
|
||||
*/
|
||||
void userUpdateRemark(String openid, String remark) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 获取用户基本信息
|
||||
* 详情请见: http://mp.weixin.qq.com/wiki/index.php?title=获取用户基本信息
|
||||
* </pre>
|
||||
*
|
||||
* @param openid 用户openid
|
||||
* @param lang 语言,zh_CN 简体(默认),zh_TW 繁体,en 英语
|
||||
*/
|
||||
WxMpUser userInfo(String openid, String lang) throws WxErrorException;
|
||||
/**
|
||||
* <pre>
|
||||
* 获取用户基本信息
|
||||
* 详情请见: http://mp.weixin.qq.com/wiki/index.php?title=获取用户基本信息
|
||||
* </pre>
|
||||
*
|
||||
* @param openid 用户openid
|
||||
* @param lang 语言,zh_CN 简体(默认),zh_TW 繁体,en 英语
|
||||
*/
|
||||
WxMpUser userInfo(String openid, String lang) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 获取用户基本信息列表
|
||||
* 详情请见: http://mp.weixin.qq.com/wiki/index.php?title=批量获取用户基本信息
|
||||
* </pre>
|
||||
*
|
||||
* @param openid 用户openid, lang 使用默认(zh_CN 简体)
|
||||
*/
|
||||
List<WxMpUser> userInfoList(List<String> openidList) throws WxErrorException;
|
||||
/**
|
||||
* <pre>
|
||||
* 获取用户基本信息列表
|
||||
* 详情请见: http://mp.weixin.qq.com/wiki/index.php?title=批量获取用户基本信息
|
||||
* </pre>
|
||||
*
|
||||
* @param openid 用户openid, lang 使用默认(zh_CN 简体)
|
||||
*/
|
||||
List<WxMpUser> userInfoList(List<String> openidList) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 获取用户基本信息列表
|
||||
* 详情请见: http://mp.weixin.qq.com/wiki/index.php?title=批量获取用户基本信息
|
||||
* </pre>
|
||||
*
|
||||
* @param userQuery 详细查询参数
|
||||
*/
|
||||
List<WxMpUser> userInfoList(WxMpUserQuery userQuery) throws WxErrorException;
|
||||
/**
|
||||
* <pre>
|
||||
* 获取用户基本信息列表
|
||||
* 详情请见: http://mp.weixin.qq.com/wiki/index.php?title=批量获取用户基本信息
|
||||
* </pre>
|
||||
*
|
||||
* @param userQuery 详细查询参数
|
||||
*/
|
||||
List<WxMpUser> userInfoList(WxMpUserQuery userQuery) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* 获取关注者列表
|
||||
* 详情请见: http://mp.weixin.qq.com/wiki/index.php?title=获取关注者列表
|
||||
* </pre>
|
||||
*
|
||||
* @param nextOpenid 可选,第一个拉取的OPENID,null为从头开始拉取
|
||||
*/
|
||||
WxMpUserList userList(String nextOpenid) throws WxErrorException;
|
||||
/**
|
||||
* <pre>
|
||||
* 获取关注者列表
|
||||
* 详情请见: http://mp.weixin.qq.com/wiki/index.php?title=获取关注者列表
|
||||
* </pre>
|
||||
*
|
||||
* @param nextOpenid 可选,第一个拉取的OPENID,null为从头开始拉取
|
||||
*/
|
||||
WxMpUserList userList(String nextOpenid) throws WxErrorException;
|
||||
}
|
||||
|
@ -17,47 +17,47 @@ import me.chanjar.weixin.mp.bean.result.WxMpUserList;
|
||||
* Created by Binary Wang on 2016/7/21.
|
||||
*/
|
||||
public class WxMpUserServiceImpl implements WxMpUserService {
|
||||
private static final String API_URL_PREFIX = "https://api.weixin.qq.com/cgi-bin/user";
|
||||
private WxMpService wxMpService;
|
||||
private static final String API_URL_PREFIX = "https://api.weixin.qq.com/cgi-bin/user";
|
||||
private WxMpService wxMpService;
|
||||
|
||||
public WxMpUserServiceImpl(WxMpService wxMpService) {
|
||||
this.wxMpService = wxMpService;
|
||||
}
|
||||
public WxMpUserServiceImpl(WxMpService wxMpService) {
|
||||
this.wxMpService = wxMpService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void userUpdateRemark(String openid, String remark) throws WxErrorException {
|
||||
String url = API_URL_PREFIX + "/info/updateremark";
|
||||
JsonObject json = new JsonObject();
|
||||
json.addProperty("openid", openid);
|
||||
json.addProperty("remark", remark);
|
||||
this.wxMpService.execute(new SimplePostRequestExecutor(), url, json.toString());
|
||||
}
|
||||
@Override
|
||||
public void userUpdateRemark(String openid, String remark) throws WxErrorException {
|
||||
String url = API_URL_PREFIX + "/info/updateremark";
|
||||
JsonObject json = new JsonObject();
|
||||
json.addProperty("openid", openid);
|
||||
json.addProperty("remark", remark);
|
||||
this.wxMpService.execute(new SimplePostRequestExecutor(), url, json.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxMpUser userInfo(String openid, String lang) throws WxErrorException {
|
||||
String url = API_URL_PREFIX + "/info";
|
||||
lang = lang == null ? "zh_CN" : lang;
|
||||
String responseContent = this.wxMpService.execute(new SimpleGetRequestExecutor(), url, "openid=" + openid + "&lang=" + lang);
|
||||
return WxMpUser.fromJson(responseContent);
|
||||
}
|
||||
@Override
|
||||
public WxMpUser userInfo(String openid, String lang) throws WxErrorException {
|
||||
String url = API_URL_PREFIX + "/info";
|
||||
lang = lang == null ? "zh_CN" : lang;
|
||||
String responseContent = this.wxMpService.execute(new SimpleGetRequestExecutor(), url, "openid=" + openid + "&lang=" + lang);
|
||||
return WxMpUser.fromJson(responseContent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxMpUserList userList(String next_openid) throws WxErrorException {
|
||||
String url = API_URL_PREFIX + "/get";
|
||||
String responseContent = this.wxMpService.execute(new SimpleGetRequestExecutor(), url, next_openid == null ? null : "next_openid=" + next_openid);
|
||||
return WxMpUserList.fromJson(responseContent);
|
||||
}
|
||||
@Override
|
||||
public WxMpUserList userList(String next_openid) throws WxErrorException {
|
||||
String url = API_URL_PREFIX + "/get";
|
||||
String responseContent = this.wxMpService.execute(new SimpleGetRequestExecutor(), url, next_openid == null ? null : "next_openid=" + next_openid);
|
||||
return WxMpUserList.fromJson(responseContent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WxMpUser> userInfoList(List<String> openidList) throws WxErrorException {
|
||||
return userInfoList(new WxMpUserQuery(openidList));
|
||||
}
|
||||
@Override
|
||||
public List<WxMpUser> userInfoList(List<String> openidList) throws WxErrorException {
|
||||
return userInfoList(new WxMpUserQuery(openidList));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WxMpUser> userInfoList(WxMpUserQuery userQuery) throws WxErrorException {
|
||||
String url = API_URL_PREFIX + "/info/batchget";
|
||||
String responseContent = this.wxMpService.execute(new SimpleGetRequestExecutor(), url, userQuery.toJsonString());
|
||||
return WxMpUser.fromJsonList(responseContent);
|
||||
}
|
||||
@Override
|
||||
public List<WxMpUser> userInfoList(WxMpUserQuery userQuery) throws WxErrorException {
|
||||
String url = API_URL_PREFIX + "/info/batchget";
|
||||
String responseContent = this.wxMpService.execute(new SimpleGetRequestExecutor(), url, userQuery.toJsonString());
|
||||
return WxMpUser.fromJsonList(responseContent);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -15,180 +15,180 @@ import com.google.gson.Gson;
|
||||
* @author LiuJunGuang
|
||||
*/
|
||||
public class WxMpUserQuery {
|
||||
private List<WxMpUserQueryParam> queryParamList = new ArrayList<>();
|
||||
private List<WxMpUserQueryParam> queryParamList = new ArrayList<>();
|
||||
|
||||
public WxMpUserQuery() {
|
||||
super();
|
||||
}
|
||||
public WxMpUserQuery() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* 语言使用默认(zh_CN)
|
||||
*
|
||||
* @description
|
||||
* @param openIdList
|
||||
*/
|
||||
public WxMpUserQuery(List<String> openIdList) {
|
||||
super();
|
||||
add(openIdList);
|
||||
}
|
||||
/**
|
||||
* 语言使用默认(zh_CN)
|
||||
*
|
||||
* @description
|
||||
* @param openIdList
|
||||
*/
|
||||
public WxMpUserQuery(List<String> openIdList) {
|
||||
super();
|
||||
add(openIdList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加OpenId列表,语言使用默认(zh_CN)
|
||||
*
|
||||
* @param openIdList
|
||||
* @return {@link WxMpUserQuery}
|
||||
*/
|
||||
public WxMpUserQuery add(List<String> openIdList) {
|
||||
for (String openId : openIdList) {
|
||||
this.add(openId);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* 添加OpenId列表,语言使用默认(zh_CN)
|
||||
*
|
||||
* @param openIdList
|
||||
* @return {@link WxMpUserQuery}
|
||||
*/
|
||||
public WxMpUserQuery add(List<String> openIdList) {
|
||||
for (String openId : openIdList) {
|
||||
this.add(openId);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加一个OpenId
|
||||
*
|
||||
* @param openId
|
||||
* @param lang 国家地区语言版本,zh_CN 简体,zh_TW 繁体,en 英语
|
||||
* @return {@link WxMpUserQuery}
|
||||
*/
|
||||
public WxMpUserQuery add(String openId, String lang) {
|
||||
queryParamList.add(new WxMpUserQueryParam(openId, lang));
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* 添加一个OpenId
|
||||
*
|
||||
* @param openId
|
||||
* @param lang 国家地区语言版本,zh_CN 简体,zh_TW 繁体,en 英语
|
||||
* @return {@link WxMpUserQuery}
|
||||
*/
|
||||
public WxMpUserQuery add(String openId, String lang) {
|
||||
queryParamList.add(new WxMpUserQueryParam(openId, lang));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加一个OpenId到列表中,并返回本对象
|
||||
*
|
||||
* <pre>
|
||||
* 该方法默认lang = zh_CN
|
||||
* </pre>
|
||||
*
|
||||
* @param openId
|
||||
* @return {@link WxMpUserQuery}
|
||||
*/
|
||||
public WxMpUserQuery add(String openId) {
|
||||
queryParamList.add(new WxMpUserQueryParam(openId));
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* 添加一个OpenId到列表中,并返回本对象
|
||||
*
|
||||
* <pre>
|
||||
* 该方法默认lang = zh_CN
|
||||
* </pre>
|
||||
*
|
||||
* @param openId
|
||||
* @return {@link WxMpUserQuery}
|
||||
*/
|
||||
public WxMpUserQuery add(String openId) {
|
||||
queryParamList.add(new WxMpUserQueryParam(openId));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除指定的OpenId,语言使用默认(zh_CN)
|
||||
*
|
||||
* @param openId
|
||||
* @return {@link WxMpUserQuery}
|
||||
*/
|
||||
public WxMpUserQuery remove(String openId) {
|
||||
queryParamList.remove(new WxMpUserQueryParam(openId));
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* 删除指定的OpenId,语言使用默认(zh_CN)
|
||||
*
|
||||
* @param openId
|
||||
* @return {@link WxMpUserQuery}
|
||||
*/
|
||||
public WxMpUserQuery remove(String openId) {
|
||||
queryParamList.remove(new WxMpUserQueryParam(openId));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除指定的OpenId
|
||||
*
|
||||
* @param openId
|
||||
* @param lang 国家地区语言版本,zh_CN 简体,zh_TW 繁体,en 英语
|
||||
* @return {@link WxMpUserQuery}
|
||||
*/
|
||||
public WxMpUserQuery remove(String openId, String lang) {
|
||||
queryParamList.remove(new WxMpUserQueryParam(openId, lang));
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* 删除指定的OpenId
|
||||
*
|
||||
* @param openId
|
||||
* @param lang 国家地区语言版本,zh_CN 简体,zh_TW 繁体,en 英语
|
||||
* @return {@link WxMpUserQuery}
|
||||
*/
|
||||
public WxMpUserQuery remove(String openId, String lang) {
|
||||
queryParamList.remove(new WxMpUserQueryParam(openId, lang));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取查询参数列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List<WxMpUserQueryParam> getQueryParamList() {
|
||||
return queryParamList;
|
||||
}
|
||||
/**
|
||||
* 获取查询参数列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List<WxMpUserQueryParam> getQueryParamList() {
|
||||
return queryParamList;
|
||||
}
|
||||
|
||||
public String toJsonString() {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("user_list", queryParamList);
|
||||
return new Gson().toJson(map);
|
||||
}
|
||||
public String toJsonString() {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("user_list", queryParamList);
|
||||
return new Gson().toJson(map);
|
||||
}
|
||||
|
||||
// 查询参数封装
|
||||
public class WxMpUserQueryParam implements Serializable {
|
||||
/**
|
||||
* @fields serialVersionUID
|
||||
*/
|
||||
private static final long serialVersionUID = -6863571795702385319L;
|
||||
private String openid;
|
||||
private String lang;
|
||||
// 查询参数封装
|
||||
public class WxMpUserQueryParam implements Serializable {
|
||||
/**
|
||||
* @fields serialVersionUID
|
||||
*/
|
||||
private static final long serialVersionUID = -6863571795702385319L;
|
||||
private String openid;
|
||||
private String lang;
|
||||
|
||||
public WxMpUserQueryParam(String openid, String lang) {
|
||||
super();
|
||||
this.openid = openid;
|
||||
this.lang = lang;
|
||||
}
|
||||
public WxMpUserQueryParam(String openid, String lang) {
|
||||
super();
|
||||
this.openid = openid;
|
||||
this.lang = lang;
|
||||
}
|
||||
|
||||
public WxMpUserQueryParam(String openid) {
|
||||
super();
|
||||
this.openid = openid;
|
||||
this.lang = "zh_CN";
|
||||
}
|
||||
public WxMpUserQueryParam(String openid) {
|
||||
super();
|
||||
this.openid = openid;
|
||||
this.lang = "zh_CN";
|
||||
}
|
||||
|
||||
public WxMpUserQueryParam() {
|
||||
super();
|
||||
}
|
||||
public WxMpUserQueryParam() {
|
||||
super();
|
||||
}
|
||||
|
||||
public String getOpenid() {
|
||||
return openid;
|
||||
}
|
||||
public String getOpenid() {
|
||||
return openid;
|
||||
}
|
||||
|
||||
public void setOpenid(String openid) {
|
||||
this.openid = openid;
|
||||
}
|
||||
public void setOpenid(String openid) {
|
||||
this.openid = openid;
|
||||
}
|
||||
|
||||
public String getLang() {
|
||||
return lang;
|
||||
}
|
||||
public String getLang() {
|
||||
return lang;
|
||||
}
|
||||
|
||||
public void setLang(String lang) {
|
||||
this.lang = lang;
|
||||
}
|
||||
public void setLang(String lang) {
|
||||
this.lang = lang;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + getOuterType().hashCode();
|
||||
result = prime * result + ((lang == null) ? 0 : lang.hashCode());
|
||||
result = prime * result + ((openid == null) ? 0 : openid.hashCode());
|
||||
return result;
|
||||
}
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + getOuterType().hashCode();
|
||||
result = prime * result + ((lang == null) ? 0 : lang.hashCode());
|
||||
result = prime * result + ((openid == null) ? 0 : openid.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
WxMpUserQueryParam other = (WxMpUserQueryParam) obj;
|
||||
if (!getOuterType().equals(other.getOuterType()))
|
||||
return false;
|
||||
if (lang == null) {
|
||||
if (other.lang != null)
|
||||
return false;
|
||||
} else if (!lang.equals(other.lang))
|
||||
return false;
|
||||
if (openid == null) {
|
||||
if (other.openid != null)
|
||||
return false;
|
||||
} else if (!openid.equals(other.openid))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
WxMpUserQueryParam other = (WxMpUserQueryParam) obj;
|
||||
if (!getOuterType().equals(other.getOuterType()))
|
||||
return false;
|
||||
if (lang == null) {
|
||||
if (other.lang != null)
|
||||
return false;
|
||||
} else if (!lang.equals(other.lang))
|
||||
return false;
|
||||
if (openid == null) {
|
||||
if (other.openid != null)
|
||||
return false;
|
||||
} else if (!openid.equals(other.openid))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
private WxMpUserQuery getOuterType() {
|
||||
return WxMpUserQuery.this;
|
||||
}
|
||||
private WxMpUserQuery getOuterType() {
|
||||
return WxMpUserQuery.this;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -12,164 +12,149 @@ import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||
|
||||
/**
|
||||
* 微信用户信息
|
||||
*
|
||||
* @author chanjarster
|
||||
*
|
||||
*/
|
||||
public class WxMpUser implements Serializable {
|
||||
|
||||
/**
|
||||
* @fields serialVersionUID
|
||||
*/
|
||||
private static final long serialVersionUID = 5788154322646488738L;
|
||||
protected Boolean subscribe;
|
||||
protected String openId;
|
||||
protected String nickname;
|
||||
protected String sex;
|
||||
protected String language;
|
||||
protected String city;
|
||||
protected String province;
|
||||
protected String country;
|
||||
protected String headImgUrl;
|
||||
protected Long subscribeTime;
|
||||
protected String unionId;
|
||||
protected Integer sexId;
|
||||
protected String remark;
|
||||
protected Integer groupId;
|
||||
/**
|
||||
* @fields serialVersionUID
|
||||
*/
|
||||
private static final long serialVersionUID = 5788154322646488738L;
|
||||
protected Boolean subscribe;
|
||||
protected String openId;
|
||||
protected String nickname;
|
||||
protected String sex;
|
||||
protected String language;
|
||||
protected String city;
|
||||
protected String province;
|
||||
protected String country;
|
||||
protected String headImgUrl;
|
||||
protected Long subscribeTime;
|
||||
protected String unionId;
|
||||
protected Integer sexId;
|
||||
protected String remark;
|
||||
protected Integer groupId;
|
||||
|
||||
public Boolean getSubscribe() {
|
||||
return subscribe;
|
||||
}
|
||||
public Boolean getSubscribe() {
|
||||
return subscribe;
|
||||
}
|
||||
public Boolean isSubscribe() {
|
||||
return subscribe;
|
||||
}
|
||||
public void setSubscribe(Boolean subscribe) {
|
||||
this.subscribe = subscribe;
|
||||
}
|
||||
public String getOpenId() {
|
||||
return openId;
|
||||
}
|
||||
public void setOpenId(String openId) {
|
||||
this.openId = openId;
|
||||
}
|
||||
public String getNickname() {
|
||||
return nickname;
|
||||
}
|
||||
public void setNickname(String nickname) {
|
||||
this.nickname = nickname;
|
||||
}
|
||||
public String getSex() {
|
||||
return sex;
|
||||
}
|
||||
public void setSex(String sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
public String getLanguage() {
|
||||
return language;
|
||||
}
|
||||
public void setLanguage(String language) {
|
||||
this.language = language;
|
||||
}
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
public String getProvince() {
|
||||
return province;
|
||||
}
|
||||
public void setProvince(String province) {
|
||||
this.province = province;
|
||||
}
|
||||
public String getCountry() {
|
||||
return country;
|
||||
}
|
||||
public void setCountry(String country) {
|
||||
this.country = country;
|
||||
}
|
||||
public String getHeadImgUrl() {
|
||||
return headImgUrl;
|
||||
}
|
||||
public void setHeadImgUrl(String headImgUrl) {
|
||||
this.headImgUrl = headImgUrl;
|
||||
}
|
||||
public Long getSubscribeTime() {
|
||||
return subscribeTime;
|
||||
}
|
||||
public void setSubscribeTime(Long subscribeTime) {
|
||||
this.subscribeTime = subscribeTime;
|
||||
}
|
||||
public String getUnionId() {
|
||||
return unionId;
|
||||
}
|
||||
public void setUnionId(String unionId) {
|
||||
this.unionId = unionId;
|
||||
}
|
||||
|
||||
public Boolean isSubscribe() {
|
||||
return subscribe;
|
||||
}
|
||||
public Integer getSexId() {
|
||||
|
||||
public void setSubscribe(Boolean subscribe) {
|
||||
this.subscribe = subscribe;
|
||||
}
|
||||
return sexId;
|
||||
}
|
||||
|
||||
public String getOpenId() {
|
||||
return openId;
|
||||
}
|
||||
public void setSexId(Integer sexId) {
|
||||
this.sexId = sexId;
|
||||
}
|
||||
|
||||
public void setOpenId(String openId) {
|
||||
this.openId = openId;
|
||||
}
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
public Integer getGroupId() {
|
||||
return groupId;
|
||||
}
|
||||
public void setGroupId(Integer groupId) {
|
||||
this.groupId = groupId;
|
||||
}
|
||||
|
||||
public String getNickname() {
|
||||
return nickname;
|
||||
}
|
||||
public static WxMpUser fromJson(String json) {
|
||||
return WxMpGsonBuilder.INSTANCE.create().fromJson(json, WxMpUser.class);
|
||||
}
|
||||
|
||||
public void setNickname(String nickname) {
|
||||
this.nickname = nickname;
|
||||
}
|
||||
public static List<WxMpUser> fromJsonList(String json) {
|
||||
Type collectionType = new TypeToken<List<WxMpUser>>() {}.getType();
|
||||
Gson gson = WxMpGsonBuilder.INSTANCE.create();
|
||||
JsonObject jsonObject = gson.fromJson(json, JsonObject.class);
|
||||
return gson.fromJson(jsonObject.get("user_info_list"), collectionType);
|
||||
}
|
||||
|
||||
public String getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(String sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getLanguage() {
|
||||
return language;
|
||||
}
|
||||
|
||||
public void setLanguage(String language) {
|
||||
this.language = language;
|
||||
}
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getProvince() {
|
||||
return province;
|
||||
}
|
||||
|
||||
public void setProvince(String province) {
|
||||
this.province = province;
|
||||
}
|
||||
|
||||
public String getCountry() {
|
||||
return country;
|
||||
}
|
||||
|
||||
public void setCountry(String country) {
|
||||
this.country = country;
|
||||
}
|
||||
|
||||
public String getHeadImgUrl() {
|
||||
return headImgUrl;
|
||||
}
|
||||
|
||||
public void setHeadImgUrl(String headImgUrl) {
|
||||
this.headImgUrl = headImgUrl;
|
||||
}
|
||||
|
||||
public Long getSubscribeTime() {
|
||||
return subscribeTime;
|
||||
}
|
||||
|
||||
public void setSubscribeTime(Long subscribeTime) {
|
||||
this.subscribeTime = subscribeTime;
|
||||
}
|
||||
|
||||
public String getUnionId() {
|
||||
return unionId;
|
||||
}
|
||||
|
||||
public void setUnionId(String unionId) {
|
||||
this.unionId = unionId;
|
||||
}
|
||||
|
||||
public Integer getSexId() {
|
||||
|
||||
return sexId;
|
||||
}
|
||||
|
||||
public void setSexId(Integer sexId) {
|
||||
this.sexId = sexId;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public Integer getGroupId() {
|
||||
return groupId;
|
||||
}
|
||||
|
||||
public void setGroupId(Integer groupId) {
|
||||
this.groupId = groupId;
|
||||
}
|
||||
|
||||
public static WxMpUser fromJson(String json) {
|
||||
return WxMpGsonBuilder.INSTANCE.create().fromJson(json, WxMpUser.class);
|
||||
}
|
||||
|
||||
public static List<WxMpUser> fromJsonList(String json) {
|
||||
Type collectionType = new TypeToken<List<WxMpUser>>() {
|
||||
}.getType();
|
||||
Gson gson = WxMpGsonBuilder.INSTANCE.create();
|
||||
JsonObject jsonObject = gson.fromJson(json, JsonObject.class);
|
||||
return gson.fromJson(jsonObject.get("user_info_list"), collectionType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "WxMpUser{" + "subscribe=" + subscribe + ", openId='" + openId + '\'' + ", nickname='" + nickname + '\'' + ", sex='" + sex + '\'' + ", language='" + language + '\''
|
||||
+ ", city='" + city + '\'' + ", province='" + province + '\'' + ", country='" + country + '\'' + ", headImgUrl='" + headImgUrl + '\'' + ", subscribeTime=" + subscribeTime
|
||||
+ ", unionId='" + unionId + '\'' + ", remark='" + remark + '\'' + ", groupId='" + groupId + '\'' + '}';
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return "WxMpUser{" +
|
||||
"subscribe=" + subscribe +
|
||||
", openId='" + openId + '\'' +
|
||||
", nickname='" + nickname + '\'' +
|
||||
", sex='" + sex + '\'' +
|
||||
", language='" + language + '\'' +
|
||||
", city='" + city + '\'' +
|
||||
", province='" + province + '\'' +
|
||||
", country='" + country + '\'' +
|
||||
", headImgUrl='" + headImgUrl + '\'' +
|
||||
", subscribeTime=" + subscribeTime +
|
||||
", unionId='" + unionId + '\'' +
|
||||
", remark='" + remark + '\'' +
|
||||
", groupId='" + groupId + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user