mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
增加查看客服聊天记录的接口 #5
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
package me.chanjar.weixin.mp.bean.kefu.result;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by Binary Wang on 2016/7/15.
|
||||
*/
|
||||
public class WxMpKfMsgList {
|
||||
@SerializedName("recordlist")
|
||||
private List<WxMpKfMsgRecord> records;
|
||||
|
||||
@SerializedName("number")
|
||||
private Integer number;
|
||||
|
||||
@SerializedName("msgid")
|
||||
private Long msgId;
|
||||
|
||||
public List<WxMpKfMsgRecord> getRecords() {
|
||||
return records;
|
||||
}
|
||||
|
||||
public void setRecords(List<WxMpKfMsgRecord> records) {
|
||||
this.records = records;
|
||||
}
|
||||
|
||||
public Integer getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public void setNumber(Integer number) {
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
public Long getMsgId() {
|
||||
return msgId;
|
||||
}
|
||||
|
||||
public void setMsgId(Long msgId) {
|
||||
this.msgId = msgId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return ToStringBuilder.reflectionToString(this, ToStringStyle.JSON_STYLE);
|
||||
}
|
||||
|
||||
public static WxMpKfMsgList fromJson(String responseContent) {
|
||||
return WxMpGsonBuilder.INSTANCE.create().fromJson(responseContent, WxMpKfMsgList.class);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package me.chanjar.weixin.mp.bean.kefu.result;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import me.chanjar.weixin.mp.util.json.WxLongTimeJsonSerializer;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* Created by Binary Wang on 2016/7/18.
|
||||
*/
|
||||
public class WxMpKfMsgRecord {
|
||||
/**
|
||||
* worker 完整客服帐号,格式为:帐号前缀@公众号微信号
|
||||
*/
|
||||
@SerializedName("worker")
|
||||
private String worker;
|
||||
|
||||
/**
|
||||
* openid 用户标识
|
||||
*/
|
||||
@SerializedName("openid")
|
||||
private String openid;
|
||||
|
||||
/**
|
||||
* opercode 操作码,2002(客服发送信息),2003(客服接收消息)
|
||||
*/
|
||||
@SerializedName("opercode")
|
||||
private Integer operateCode;
|
||||
|
||||
/**
|
||||
* text 聊天记录
|
||||
*/
|
||||
@SerializedName("text")
|
||||
private String text;
|
||||
|
||||
/**
|
||||
* time 操作时间,unix时间戳
|
||||
*/
|
||||
@SerializedName("time")
|
||||
@JsonSerialize(using = WxLongTimeJsonSerializer.class)
|
||||
private Long time;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return ToStringBuilder.reflectionToString(this, ToStringStyle.JSON_STYLE);
|
||||
}
|
||||
public String getWorker() {
|
||||
return worker;
|
||||
}
|
||||
|
||||
public void setWorker(String worker) {
|
||||
this.worker = worker;
|
||||
}
|
||||
|
||||
public String getOpenid() {
|
||||
return openid;
|
||||
}
|
||||
|
||||
public void setOpenid(String openid) {
|
||||
this.openid = openid;
|
||||
}
|
||||
|
||||
public String getText() {
|
||||
return text;
|
||||
}
|
||||
|
||||
public void setText(String text) {
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
public Long getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public void setTime(Long time) {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
public Integer getOperateCode() {
|
||||
return operateCode;
|
||||
}
|
||||
|
||||
public void setOperateCode(Integer operateCode) {
|
||||
this.operateCode = operateCode;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user