mirror of
https://gitee.com/hotlcc/wechat4j.git
synced 2025-06-27 20:52:45 +08:00
提交代码:采用lombok
This commit is contained in:
parent
3e0e974a45
commit
8d4c2cace0
7
pom.xml
7
pom.xml
@ -79,7 +79,12 @@
|
|||||||
<artifactId>javase</artifactId>
|
<artifactId>javase</artifactId>
|
||||||
<version>3.3.3</version>
|
<version>3.3.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!--lombok简化开发-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<version>1.16.20</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
@ -3,10 +3,12 @@ package com.hotlcc.wechat4j.model;
|
|||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@Getter
|
||||||
public final class AppInfo {
|
public final class AppInfo {
|
||||||
private AppInfo() {
|
private AppInfo() {
|
||||||
}
|
}
|
||||||
@ -16,14 +18,6 @@ public final class AppInfo {
|
|||||||
@JSONField(name = "AppID")
|
@JSONField(name = "AppID")
|
||||||
private String appID;
|
private String appID;
|
||||||
|
|
||||||
public Integer getType() {
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAppID() {
|
|
||||||
return appID;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static AppInfo valueOf(JSONObject info) {
|
public static AppInfo valueOf(JSONObject info) {
|
||||||
if (info == null) {
|
if (info == null) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -2,10 +2,14 @@ package com.hotlcc.wechat4j.model;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
import com.hotlcc.wechat4j.util.WechatUtil;
|
import com.hotlcc.wechat4j.util.WechatUtil;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 基本请求模型
|
* 基本请求模型
|
||||||
*/
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
public class BaseRequest {
|
public class BaseRequest {
|
||||||
public BaseRequest() {
|
public BaseRequest() {
|
||||||
}
|
}
|
||||||
@ -29,36 +33,4 @@ public class BaseRequest {
|
|||||||
private String skey;
|
private String skey;
|
||||||
@JSONField(name = "Uin")
|
@JSONField(name = "Uin")
|
||||||
private String uin;
|
private String uin;
|
||||||
|
|
||||||
public String getDeviceID() {
|
|
||||||
return deviceID;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDeviceID(String deviceID) {
|
|
||||||
deviceID = deviceID;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSid() {
|
|
||||||
return sid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSid(String sid) {
|
|
||||||
sid = sid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSkey() {
|
|
||||||
return skey;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSkey(String skey) {
|
|
||||||
skey = skey;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUin() {
|
|
||||||
return uin;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUin(String uin) {
|
|
||||||
uin = uin;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -3,10 +3,12 @@ package com.hotlcc.wechat4j.model;
|
|||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@Getter
|
||||||
public final class ReceivedMsg {
|
public final class ReceivedMsg {
|
||||||
private ReceivedMsg() {
|
private ReceivedMsg() {
|
||||||
}
|
}
|
||||||
@ -68,118 +70,6 @@ public final class ReceivedMsg {
|
|||||||
@JSONField(name = "FileSize")
|
@JSONField(name = "FileSize")
|
||||||
private String fileSize;
|
private String fileSize;
|
||||||
|
|
||||||
public Integer getSubMsgType() {
|
|
||||||
return subMsgType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getVoiceLength() {
|
|
||||||
return voiceLength;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFileName() {
|
|
||||||
return fileName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getImgHeight() {
|
|
||||||
return imgHeight;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getToUserName() {
|
|
||||||
return toUserName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getHasProductId() {
|
|
||||||
return hasProductId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getImgStatus() {
|
|
||||||
return imgStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUrl() {
|
|
||||||
return url;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getImgWidth() {
|
|
||||||
return imgWidth;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getForwardFlag() {
|
|
||||||
return forwardFlag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getStatus() {
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTicket() {
|
|
||||||
return ticket;
|
|
||||||
}
|
|
||||||
|
|
||||||
public com.hotlcc.wechat4j.model.RecommendInfo getRecommendInfo() {
|
|
||||||
return recommendInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getCreateTime() {
|
|
||||||
return createTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getNewMsgId() {
|
|
||||||
return newMsgId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getMsgType() {
|
|
||||||
return msgType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getEncryFileName() {
|
|
||||||
return encryFileName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMsgId() {
|
|
||||||
return msgId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getStatusNotifyCode() {
|
|
||||||
return statusNotifyCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public AppInfo getAppInfo() {
|
|
||||||
return appInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getAppMsgType() {
|
|
||||||
return appMsgType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getPlayLength() {
|
|
||||||
return playLength;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMediaId() {
|
|
||||||
return mediaId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getContent() {
|
|
||||||
return content;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getStatusNotifyUserName() {
|
|
||||||
return statusNotifyUserName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFromUserName() {
|
|
||||||
return fromUserName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getOriContent() {
|
|
||||||
return oriContent;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFileSize() {
|
|
||||||
return fileSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ReceivedMsg valueOf(JSONObject msg) {
|
public static ReceivedMsg valueOf(JSONObject msg) {
|
||||||
if (msg == null) {
|
if (msg == null) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -3,10 +3,12 @@ package com.hotlcc.wechat4j.model;
|
|||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@Getter
|
||||||
public final class RecommendInfo {
|
public final class RecommendInfo {
|
||||||
private RecommendInfo() {
|
private RecommendInfo() {
|
||||||
}
|
}
|
||||||
@ -40,62 +42,6 @@ public final class RecommendInfo {
|
|||||||
@JSONField(name = "VerifyFlag")
|
@JSONField(name = "VerifyFlag")
|
||||||
private Integer verifyFlag;
|
private Integer verifyFlag;
|
||||||
|
|
||||||
public String getTicket() {
|
|
||||||
return ticket;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserName() {
|
|
||||||
return userName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getSex() {
|
|
||||||
return sex;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getAttrStatus() {
|
|
||||||
return attrStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCity() {
|
|
||||||
return city;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getNickName() {
|
|
||||||
return nickName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getScene() {
|
|
||||||
return scene;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getProvince() {
|
|
||||||
return province;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getContent() {
|
|
||||||
return content;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAlias() {
|
|
||||||
return alias;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSignature() {
|
|
||||||
return signature;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getOpCode() {
|
|
||||||
return opCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getQQNum() {
|
|
||||||
return qqNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getVerifyFlag() {
|
|
||||||
return verifyFlag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static RecommendInfo valueOf(JSONObject info) {
|
public static RecommendInfo valueOf(JSONObject info) {
|
||||||
if (info == null) {
|
if (info == null) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -3,6 +3,7 @@ package com.hotlcc.wechat4j.model;
|
|||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -10,6 +11,7 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* 微信用户信息
|
* 微信用户信息
|
||||||
*/
|
*/
|
||||||
|
@Getter
|
||||||
public final class UserInfo {
|
public final class UserInfo {
|
||||||
private UserInfo() {
|
private UserInfo() {
|
||||||
}
|
}
|
||||||
@ -77,130 +79,6 @@ public final class UserInfo {
|
|||||||
@JSONField(name = "UserName")
|
@JSONField(name = "UserName")
|
||||||
private String userName;
|
private String userName;
|
||||||
|
|
||||||
public Long getUin() {
|
|
||||||
return uin;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getNickName() {
|
|
||||||
return nickName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getHeadImgUrl() {
|
|
||||||
return headImgUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getContactFlag() {
|
|
||||||
return contactFlag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getMemberCount() {
|
|
||||||
return memberCount;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<UserInfo> getMemberList() {
|
|
||||||
return memberList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRemarkName() {
|
|
||||||
return remarkName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getHideInputBarFlag() {
|
|
||||||
return hideInputBarFlag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getSex() {
|
|
||||||
return sex;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSignature() {
|
|
||||||
return signature;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getVerifyFlag() {
|
|
||||||
return verifyFlag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getOwnerUin() {
|
|
||||||
return ownerUin;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPYInitial() {
|
|
||||||
return pyInitial;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPYQuanPin() {
|
|
||||||
return pyQuanPin;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRemarkPYInitial() {
|
|
||||||
return remarkPYInitial;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getRemarkPYQuanPin() {
|
|
||||||
return remarkPYQuanPin;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getStarFriend() {
|
|
||||||
return starFriend;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getAppAccountFlag() {
|
|
||||||
return appAccountFlag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getStatues() {
|
|
||||||
return statues;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getAttrStatus() {
|
|
||||||
return attrStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getProvince() {
|
|
||||||
return province;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCity() {
|
|
||||||
return city;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAlias() {
|
|
||||||
return alias;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getSnsFlag() {
|
|
||||||
return snsFlag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getUniFriend() {
|
|
||||||
return uniFriend;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDisplayName() {
|
|
||||||
return displayName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getChatRoomId() {
|
|
||||||
return chatRoomId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getKeyWord() {
|
|
||||||
return keyWord;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getEncryChatRoomId() {
|
|
||||||
return encryChatRoomId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getIsOwner() {
|
|
||||||
return isOwner;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUserName() {
|
|
||||||
return userName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static UserInfo valueOf(JSONObject info) {
|
public static UserInfo valueOf(JSONObject info) {
|
||||||
if (info == null) {
|
if (info == null) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -1,10 +1,14 @@
|
|||||||
package com.hotlcc.wechat4j.model;
|
package com.hotlcc.wechat4j.model;
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 要发送的消息
|
* 要发送的消息
|
||||||
*/
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
public class WxMessage {
|
public class WxMessage {
|
||||||
@JSONField(name = "ClientMsgId")
|
@JSONField(name = "ClientMsgId")
|
||||||
private String clientMsgId;
|
private String clientMsgId;
|
||||||
@ -18,52 +22,4 @@ public class WxMessage {
|
|||||||
private String toUserName;
|
private String toUserName;
|
||||||
@JSONField(name = "Type")
|
@JSONField(name = "Type")
|
||||||
private Integer type;
|
private Integer type;
|
||||||
|
|
||||||
public String getClientMsgId() {
|
|
||||||
return clientMsgId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setClientMsgId(String clientMsgId) {
|
|
||||||
this.clientMsgId = clientMsgId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getContent() {
|
|
||||||
return content;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setContent(String content) {
|
|
||||||
this.content = content;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFromUserName() {
|
|
||||||
return fromUserName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFromUserName(String fromUserName) {
|
|
||||||
this.fromUserName = fromUserName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLocalID() {
|
|
||||||
return localID;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLocalID(String localID) {
|
|
||||||
this.localID = localID;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getToUserName() {
|
|
||||||
return toUserName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setToUserName(String toUserName) {
|
|
||||||
this.toUserName = toUserName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getType() {
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setType(Integer type) {
|
|
||||||
this.type = type;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user