mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
添加多客服中客服管理的6个接口
This commit is contained in:
@@ -0,0 +1,133 @@
|
||||
package me.chanjar.weixin.mp.bean.customerservice.request;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.apache.commons.codec.digest.Md5Crypt;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||
|
||||
public class WxMpKfAccountRequest implements Serializable {
|
||||
private static final long serialVersionUID = -5451863610674856927L;
|
||||
|
||||
/**
|
||||
* kf_account 完整客服账号,格式为:账号前缀@公众号微信号
|
||||
*/
|
||||
@SerializedName("kf_account")
|
||||
private String kfAccount;
|
||||
|
||||
/**
|
||||
* nickname 客服昵称,最长6个汉字或12个英文字符
|
||||
*/
|
||||
@SerializedName("nickname")
|
||||
private String nickName;
|
||||
|
||||
/**
|
||||
* password 客服账号登录密码,格式为密码明文的32位加密MD5值
|
||||
*/
|
||||
@SerializedName("password")
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* rawPassword 客服账号登录密码,明文密码,仅用于辅助操作
|
||||
*/
|
||||
@SerializedName("rawPassword")
|
||||
private String rawPassword;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return ToStringBuilder.reflectionToString(this);
|
||||
}
|
||||
|
||||
public String toJson() {
|
||||
return WxMpGsonBuilder.INSTANCE.create().toJson(this);
|
||||
}
|
||||
|
||||
public String getKfAccount() {
|
||||
return this.kfAccount;
|
||||
}
|
||||
|
||||
public void setKfAccount(String kfAccount) {
|
||||
this.kfAccount = kfAccount;
|
||||
}
|
||||
|
||||
public String getNickName() {
|
||||
return this.nickName;
|
||||
}
|
||||
|
||||
public void setNickName(String nickName) {
|
||||
this.nickName = nickName;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return this.password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getRawPassword() {
|
||||
return this.rawPassword;
|
||||
}
|
||||
|
||||
public void setRawPassword(String rawPassword) {
|
||||
this.rawPassword = rawPassword;
|
||||
}
|
||||
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
private String kfAccount;
|
||||
private String nickName;
|
||||
private String password;
|
||||
private String rawPassword;
|
||||
|
||||
@SuppressWarnings("hiding")
|
||||
public Builder kfAccount(String kfAccount) {
|
||||
this.kfAccount = kfAccount;
|
||||
return this;
|
||||
}
|
||||
|
||||
@SuppressWarnings("hiding")
|
||||
public Builder nickName(String nickName) {
|
||||
this.nickName = nickName;
|
||||
return this;
|
||||
}
|
||||
|
||||
@SuppressWarnings("hiding")
|
||||
public Builder password(String password) {
|
||||
this.password = password;
|
||||
return this;
|
||||
}
|
||||
|
||||
@SuppressWarnings("hiding")
|
||||
public Builder rawPassword(String rawPassword) {
|
||||
this.rawPassword = rawPassword;
|
||||
this.password(Md5Crypt.md5Crypt(rawPassword.getBytes()));
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder from(WxMpKfAccountRequest origin) {
|
||||
this.kfAccount(origin.kfAccount);
|
||||
this.nickName(origin.nickName);
|
||||
this.password(origin.password);
|
||||
this.rawPassword(origin.rawPassword);
|
||||
return this;
|
||||
}
|
||||
|
||||
public WxMpKfAccountRequest build() {
|
||||
WxMpKfAccountRequest m = new WxMpKfAccountRequest();
|
||||
m.kfAccount = this.kfAccount;
|
||||
m.nickName = this.nickName;
|
||||
m.password = this.password;
|
||||
m.rawPassword = this.rawPassword;
|
||||
return m;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
package me.chanjar.weixin.mp.bean.customerservice.result;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
/**
|
||||
* 客服基本信息以及客服在线状态信息
|
||||
* @author Binary Wang
|
||||
*
|
||||
*/
|
||||
public class WxMpKfInfo implements Serializable {
|
||||
private static final long serialVersionUID = -5877300750666022290L;
|
||||
|
||||
/**
|
||||
* kf_account 完整客服账号,格式为:账号前缀@公众号微信号
|
||||
*/
|
||||
@SerializedName("kf_account")
|
||||
private String account;
|
||||
|
||||
/**
|
||||
* kf_headimgurl 客服头像地址
|
||||
*/
|
||||
@SerializedName("kf_headimgurl")
|
||||
private String headImgUrl;
|
||||
|
||||
/**
|
||||
* kf_id 客服工号
|
||||
*/
|
||||
@SerializedName("kf_id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* kf_nick 客服昵称
|
||||
*/
|
||||
@SerializedName("kf_nick")
|
||||
private String nick;
|
||||
|
||||
/**
|
||||
* status 客服在线状态 1:pc在线,2:手机在线。若pc和手机同时在线则为 1+2=3
|
||||
*/
|
||||
@SerializedName("status")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* auto_accept 客服设置的最大自动接入数
|
||||
*/
|
||||
@Expose
|
||||
@SerializedName("auto_accept")
|
||||
private Integer autoAccept;
|
||||
|
||||
/**
|
||||
* accepted_case 客服当前正在接待的会话数
|
||||
* @return
|
||||
*/
|
||||
@Expose
|
||||
@SerializedName("accepted_case")
|
||||
private Integer acceptedCase;
|
||||
|
||||
public Integer getStatus() {
|
||||
return this.status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getAutoAccept() {
|
||||
return this.autoAccept;
|
||||
}
|
||||
|
||||
public void setAutoAccept(Integer autoAccept) {
|
||||
this.autoAccept = autoAccept;
|
||||
}
|
||||
|
||||
public Integer getAcceptedCase() {
|
||||
return this.acceptedCase;
|
||||
}
|
||||
|
||||
public void setAcceptedCase(Integer acceptedCase) {
|
||||
this.acceptedCase = acceptedCase;
|
||||
}
|
||||
|
||||
public String getAccount() {
|
||||
return this.account;
|
||||
}
|
||||
|
||||
public void setAccount(String account) {
|
||||
this.account = account;
|
||||
}
|
||||
|
||||
public String getHeadImgUrl() {
|
||||
return this.headImgUrl;
|
||||
}
|
||||
|
||||
public void setHeadImgUrl(String headImgUrl) {
|
||||
this.headImgUrl = headImgUrl;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getNick() {
|
||||
return this.nick;
|
||||
}
|
||||
|
||||
public void setNick(String nick) {
|
||||
this.nick = nick;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return ToStringBuilder.reflectionToString(this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package me.chanjar.weixin.mp.bean.customerservice.result;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||
/**
|
||||
*
|
||||
* @author Binary Wang
|
||||
*
|
||||
*/
|
||||
public class WxMpKfList {
|
||||
@SerializedName("kf_list")
|
||||
private List<WxMpKfInfo> kfList;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return ToStringBuilder.reflectionToString(this);
|
||||
}
|
||||
|
||||
public List<WxMpKfInfo> getKfList() {
|
||||
return this.kfList;
|
||||
}
|
||||
|
||||
public void setKfList(List<WxMpKfInfo> kfList) {
|
||||
this.kfList = kfList;
|
||||
}
|
||||
|
||||
public static WxMpKfList fromJson(String json) {
|
||||
return WxMpGsonBuilder.INSTANCE.create().fromJson(json, WxMpKfList.class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package me.chanjar.weixin.mp.bean.customerservice.result;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||
/**
|
||||
*
|
||||
* @author Binary Wang
|
||||
*
|
||||
*/
|
||||
public class WxMpKfOnlineList {
|
||||
@SerializedName("kf_online_list")
|
||||
private List<WxMpKfInfo> kfOnlineList;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return ToStringBuilder.reflectionToString(this);
|
||||
}
|
||||
|
||||
public List<WxMpKfInfo> getKfOnlineList() {
|
||||
return this.kfOnlineList;
|
||||
}
|
||||
|
||||
public void setKfOnlineList(List<WxMpKfInfo> kfOnlineList) {
|
||||
this.kfOnlineList = kfOnlineList;
|
||||
}
|
||||
|
||||
public static WxMpKfOnlineList fromJson(String json) {
|
||||
return WxMpGsonBuilder.INSTANCE.create().fromJson(json, WxMpKfOnlineList.class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user