mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-05-12 00:27:47 +08:00
Merge pull request #193 from ajffdnt/develop
企业号用户增加enable属性,可以同步本地系统的用户有效性
This commit is contained in:
commit
2f2543673f
@ -49,7 +49,7 @@ public class WxError implements Serializable {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "微信错误 errcode=" + errorCode + ", errmsg=" + errorMsg + "\njson:" + json;
|
||||
return "微信错误: errcode=" + errorCode + ", errmsg=" + errorMsg + "\njson:" + json;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ public class WxCpUser implements Serializable {
|
||||
private String weiXinId;
|
||||
private String avatar;
|
||||
private Integer status;
|
||||
private Integer enable;
|
||||
private final List<Attr> extAttrs = new ArrayList<Attr>();
|
||||
|
||||
public String getUserId() {
|
||||
@ -114,6 +115,14 @@ public class WxCpUser implements Serializable {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getEnable() {
|
||||
return enable;
|
||||
}
|
||||
|
||||
public void setEnable(Integer enable) {
|
||||
this.enable = enable;
|
||||
}
|
||||
|
||||
public void addExtAttr(String name, String value) {
|
||||
this.extAttrs.add(new Attr(name, value));
|
||||
}
|
||||
|
@ -98,6 +98,9 @@ public class WxCpUserGsonAdapter implements JsonDeserializer<WxCpUser>, JsonSeri
|
||||
if (user.getStatus() != null) {
|
||||
o.addProperty("status", user.getStatus());
|
||||
}
|
||||
if (user.getEnable() != null) {
|
||||
o.addProperty("enable", user.getEnable());
|
||||
}
|
||||
if (user.getExtAttrs().size() > 0) {
|
||||
JsonArray attrsJsonArray = new JsonArray();
|
||||
for (WxCpUser.Attr attr : user.getExtAttrs()) {
|
||||
|
Loading…
Reference in New Issue
Block a user