企业微信

This commit is contained in:
jinyu
2017-08-23 22:07:26 +08:00
parent db0f4b3014
commit e197e3cd73
7 changed files with 74 additions and 103 deletions
@@ -22,11 +22,6 @@ public class AgentInfo extends AgentSetter {
*/
@JSONField(name = "square_logo_url")
private String squareLogoUrl;
/**
* 企业应用圆形头像
*/
@JSONField(name = "round_logo_url")
private String roundLogoUrl;
/**
* 企业应用可见范围(人员),其中包括userid和关注状态state
*/
@@ -46,23 +41,11 @@ public class AgentInfo extends AgentSetter {
* 企业应用是否被禁用
*/
private boolean close;
/**
* 应用类型。1:消息型;2:主页型
*/
private int type;
public AgentInfo() {
super(0);
}
public String getSquareLogoUrl() {
return squareLogoUrl;
}
public String getRoundLogoUrl() {
return roundLogoUrl;
}
public List<User> getAllowUsers() {
return allowUsers;
}
@@ -97,26 +80,15 @@ public class AgentInfo extends AgentSetter {
this.squareLogoUrl = squareLogoUrl;
}
public void setRoundLogoUrl(String roundLogoUrl) {
this.roundLogoUrl = roundLogoUrl;
}
public void setClose(boolean close) {
this.close = close;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
@Override
public String toString() {
return "AgentInfo [type=" + type + ", squareLogoUrl=" + squareLogoUrl + ", roundLogoUrl=" + roundLogoUrl
+ ", allowUsers=" + allowUsers + ", allowPartys=" + allowPartys + ", allowTags=" + allowTags
+ ", close=" + close + ", " + super.toString() + "]";
return "AgentInfo [squareLogoUrl=" + squareLogoUrl + ", allowUsers="
+ allowUsers + ", allowPartys=" + allowPartys + ", allowTags="
+ allowTags + ", close=" + close + ", " + super.toString()
+ "]";
}
}
@@ -30,11 +30,6 @@ public class AgentOverview implements Serializable {
*/
@JSONField(name = "square_logo_url")
private String squareLogoUrl;
/**
* 企业应用圆形头像
*/
@JSONField(name = "round_logo_url")
private String roundLogoUrl;
public int getAgentId() {
return agentId;
@@ -48,10 +43,6 @@ public class AgentOverview implements Serializable {
return squareLogoUrl;
}
public String getRoundLogoUrl() {
return roundLogoUrl;
}
// ---------- setter 应该全部去掉
public void setAgentId(int agentId) {
this.agentId = agentId;
@@ -65,14 +56,9 @@ public class AgentOverview implements Serializable {
this.squareLogoUrl = squareLogoUrl;
}
public void setRoundLogoUrl(String roundLogoUrl) {
this.roundLogoUrl = roundLogoUrl;
}
@Override
public String toString() {
return "AgentOverview [agentId=" + agentId + ", name=" + name
+ ", squareLogoUrl=" + squareLogoUrl + ", roundLogoUrl="
+ roundLogoUrl + "]";
+ ", squareLogoUrl=" + squareLogoUrl + "]";
}
}
@@ -46,26 +46,16 @@ public class AgentSetter implements Serializable {
*/
@JSONField(name = "redirect_domain")
private String redirectDomain;
/**
* 是否接收用户变更通知。0:不接收;1:接收。主页型应用无需该参数
*/
@JSONField(name = "isreportuser")
private boolean isReportUser;
/**
* 是否上报用户进入应用事件。0:不接收;1:接收。主页型应用无需该参数
*/
@JSONField(name = "isreportenter")
private boolean isReportEnter;
/**
* 主页型应用url。url必须以http或者https开头。消息型应用无需该参数
* 应用主页url。url必须以http或者https开头。消息型应用无需该参数
*/
@JSONField(name = "home_url")
private String homeUrl;
/**
* 关联会话url
*/
@JSONField(name = "chat_extension_url")
private String chatExtensionUrl;
public AgentSetter(int agentId) {
this.agentId = agentId;
@@ -95,10 +85,6 @@ public class AgentSetter implements Serializable {
return redirectDomain;
}
public boolean isReportUser() {
return isReportUser;
}
public boolean isReportEnter() {
return isReportEnter;
}
@@ -137,10 +123,6 @@ public class AgentSetter implements Serializable {
this.logoMediaId = logoMediaId;
}
public void setReportUser(boolean isReportUser) {
this.isReportUser = isReportUser;
}
public void setReportEnter(boolean isReportEnter) {
this.isReportEnter = isReportEnter;
}
@@ -149,22 +131,12 @@ public class AgentSetter implements Serializable {
this.homeUrl = homeUrl;
}
public String getChatExtensionUrl() {
return chatExtensionUrl;
}
public void setChatExtensionUrl(String chatExtensionUrl) {
this.chatExtensionUrl = chatExtensionUrl;
}
@Override
public String toString() {
return "agentId=" + agentId + ", reportLocationType="
+ reportLocationType + ", logoMediaId=" + logoMediaId
+ ", name=" + name + ", description=" + description
+ ", redirectDomain=" + redirectDomain + ", isReportUser="
+ isReportUser + ", isReportEnter=" + isReportEnter
+ ", homeUrl=" + homeUrl + ", chatExtensionUrl="
+ chatExtensionUrl;
+ ", redirectDomain=" + redirectDomain + ", isReportEnter="
+ isReportEnter + ", homeUrl=" + homeUrl;
}
}
@@ -31,7 +31,7 @@ public class Party implements Serializable {
@JSONField(name = "parentid")
private int parentId;
/**
* 在父部门中的次序。从1开始,数字越大排序越靠后
* 在父部门中的次序值。order值大的排序靠前。有效的值范围是[0, 2^32)
*/
private int order;
@@ -56,11 +56,6 @@ public class User implements Serializable {
* 非必须 邮箱。长度为0~64个字符。企业内必须唯一
*/
private String email;
/**
* 非必须 微信号。企业内必须唯一
*/
@JSONField(name = "weixinid")
private String weixinId;
/**
* 头像url。注:如果要获取小图将url最后的"/0"改成"/64"即可
*/
@@ -74,6 +69,25 @@ public class User implements Serializable {
*/
private List<NameValue> extattr;
/**
* 英文名。长度为1-64个字节。
*/
@JSONField(name = "english_name")
private String englishName;
/**
* 座机。长度0-64个字节。
*/
private String telephone;
/**
* 上级字段,标识是否为上级。
*/
@JSONField(name = "isleader")
private Boolean isLeader;
/**
* 启用/禁用成员。1表示启用成员,0表示禁用成员
*/
private Boolean enable;
protected User() {
}
@@ -132,10 +146,6 @@ public class User implements Serializable {
return email;
}
public String getWeixinId() {
return weixinId;
}
public String getAvatar() {
return avatar;
}
@@ -218,10 +228,6 @@ public class User implements Serializable {
this.email = email;
}
public void setWeixinId(String weixinId) {
this.weixinId = weixinId;
}
public void setAvatar(String avatar) {
this.avatar = avatar;
}
@@ -230,6 +236,38 @@ public class User implements Serializable {
this.status = status;
}
public String getEnglishName() {
return englishName;
}
public void setEnglishName(String englishName) {
this.englishName = englishName;
}
public String getTelephone() {
return telephone;
}
public void setTelephone(String telephone) {
this.telephone = telephone;
}
public Boolean getIsLeader() {
return isLeader;
}
public void setIsLeader(Boolean isLeader) {
this.isLeader = isLeader;
}
public Boolean getEnable() {
return enable;
}
public void setEnable(Boolean enable) {
this.enable = enable;
}
@Override
public int hashCode() {
final int prime = 31;
@@ -260,7 +298,9 @@ public class User implements Serializable {
return "User [userId=" + userId + ", name=" + name + ", partyIds="
+ partyIds + ", position=" + position + ", mobile=" + mobile
+ ", gender=" + gender + ", tel=" + tel + ", email=" + email
+ ", weixinId=" + weixinId + ", avatar=" + avatar + ", status="
+ status + ", extattr=" + extattr + "]";
+ ", avatar=" + avatar + ", status=" + status + ", extattr="
+ extattr + ", englishName=" + englishName + ", telephone="
+ telephone + ", isLeader=" + isLeader + ", enable=" + enable
+ "]";
}
}