diff --git a/cloud-common/src/main/java/com/cm/common/result/SuccessResultData.java b/cloud-common/src/main/java/com/cm/common/result/SuccessResultData.java index 7d4a750..ace4a7d 100644 --- a/cloud-common/src/main/java/com/cm/common/result/SuccessResultData.java +++ b/cloud-common/src/main/java/com/cm/common/result/SuccessResultData.java @@ -12,8 +12,9 @@ import java.io.Serializable; * @Version: 1.0 **/ @ApiModel -public class SuccessResultData extends SuccessResult implements Serializable { +public class SuccessResultData extends SuccessResult { + private static final long serialVersionUID = 2292105832378967169L; private T data; public SuccessResultData(T data) { diff --git a/cloud-common/src/main/java/com/cm/common/result/SuccessResultLayImData.java b/cloud-common/src/main/java/com/cm/common/result/SuccessResultLayImData.java new file mode 100644 index 0000000..2e236de --- /dev/null +++ b/cloud-common/src/main/java/com/cm/common/result/SuccessResultLayImData.java @@ -0,0 +1,219 @@ +package com.cm.common.result; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +/** + * When you feel like quitting. Think about why you started + * 当你想要放弃的时候,想想当初你为何开始 + * + * @ClassName: SuccessResultLayImData + * @Description: layim返回结果 + * @Author: wanggeng + * @Date: 2021/1/15 10:08 上午 + * @Version: 1.0 + */ +@ApiModel +public class SuccessResultLayImData extends SuccessResult { + + private static final long serialVersionUID = 4541100893920060211L; + @ApiModelProperty(name = "code", value = "0表示成功,其它表示失败") + private Integer code; + @ApiModelProperty(name = "msg", value = "失败信息") + private String msg; + @ApiModelProperty(name = "data", value = "内容") + private T data; + + public SuccessResultLayImData() { + } + + public SuccessResultLayImData(Integer code, String msg, T data) { + this.code = code; + this.msg = msg; + this.data = data; + } + + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public String getMsg() { + return msg; + } + + public void setMsg(String msg) { + this.msg = msg; + } + + public T getData() { + return data; + } + + public void setData(T data) { + this.data = data; + } + + @ApiModel + public static class InitData { + @ApiModelProperty(name = "mine", value = "我的信息") + private User mine; + @ApiModelProperty(name = "friend", value = "好友列表") + private List friend; + @ApiModelProperty(name = "group", value = "群组列表") + private List group; + + public User getMine() { + return mine; + } + + public void setMine(User mine) { + this.mine = mine; + } + + public List getFriend() { + return friend; + } + + public void setFriend(List friend) { + this.friend = friend; + } + + public List getGroup() { + return group; + } + + public void setGroup(List group) { + this.group = group; + } + + } + + @ApiModel + public static class User { + @ApiModelProperty(name = "username", value = "我的昵称") + private String username; + @ApiModelProperty(name = "id", value = "我的ID") + private String id; + @ApiModelProperty(name = "status", value = "在线状态 online:在线、hide:隐身") + private String status; + @ApiModelProperty(name = "sign", value = "我的签名") + private String sign; + @ApiModelProperty(name = "avatar", value = "我的头像") + private String avatar; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getSign() { + return sign; + } + + public void setSign(String sign) { + this.sign = sign; + } + + public String getAvatar() { + return avatar; + } + + public void setAvatar(String avatar) { + this.avatar = avatar; + } + + } + + @ApiModel + public static class Friend { + @ApiModelProperty(name = "groupname", value = "好友分组名") + private String groupname; + @ApiModelProperty(name = "id", value = "分组ID") + private String id; + @ApiModelProperty(name = "list", value = "分组下的好友列表") + private List list; + + public String getGroupname() { + return groupname; + } + + public void setGroupname(String groupname) { + this.groupname = groupname; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + } + + @ApiModel + public static class Group { + @ApiModelProperty(name = "groupname", value = "群组名") + private String groupname; + @ApiModelProperty(name = "id", value = "群组ID") + private String id; + @ApiModelProperty(name = "id", value = "群组头像") + private String avatar; + + public String getGroupname() { + return groupname; + } + + public void setGroupname(String groupname) { + this.groupname = groupname; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getAvatar() { + return avatar; + } + + public void setAvatar(String avatar) { + this.avatar = avatar; + } + } +} diff --git a/cloud-common/src/main/java/com/cm/common/result/SuccessResultList.java b/cloud-common/src/main/java/com/cm/common/result/SuccessResultList.java index f52616d..b33bd67 100644 --- a/cloud-common/src/main/java/com/cm/common/result/SuccessResultList.java +++ b/cloud-common/src/main/java/com/cm/common/result/SuccessResultList.java @@ -13,8 +13,9 @@ import java.io.Serializable; * @Version: 1.0 **/ @ApiModel -public class SuccessResultList extends SuccessResult implements Serializable { +public class SuccessResultList extends SuccessResult { + private static final long serialVersionUID = 7152646978840034322L; @ApiModelProperty(name = "rows", value = "数据列表") private List rows; @ApiModelProperty(name = "page", value = "当前页码", example = "1")