优化: 前端增加swagger实体类注解
This commit is contained in:
parent
7bc8d4fce1
commit
75eb7f42f3
|
|
@ -1,21 +1,22 @@
|
|||
package com.mdd.front.validate.article;
|
||||
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 文章收藏参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("文章收藏参数")
|
||||
public class ArticleCollectValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotNull(message = "articleId参数缺失")
|
||||
@IDMust(message = "articleId参数必须大于0")
|
||||
@ApiModelProperty(value = "文章ID", required = true)
|
||||
private Integer articleId;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
package com.mdd.front.validate.article;
|
||||
|
||||
import com.mdd.common.validator.annotation.StringContains;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 文章搜索参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("文章搜索参数")
|
||||
public class ArticleSearchValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
@ -17,9 +17,11 @@ public class ArticleSearchValidate implements Serializable {
|
|||
private Integer cid;
|
||||
|
||||
@Length(max = 100, message = "关键词过长了")
|
||||
@ApiModelProperty(value = "关键词")
|
||||
private String keyword;
|
||||
|
||||
@StringContains(values = {"hot", "new"})
|
||||
@ApiModelProperty(value = "排序号")
|
||||
private String sort;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,14 @@
|
|||
package com.mdd.front.validate.common;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.DecimalMax;
|
||||
import javax.validation.constraints.DecimalMin;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 分页参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("分页参数")
|
||||
public class PageValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
package com.mdd.front.validate.common;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
|
|
@ -9,17 +11,20 @@ import javax.validation.constraints.Pattern;
|
|||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@ApiModel("短信发送参数")
|
||||
public class SmsValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotNull(message = "scene参数缺失")
|
||||
@ApiModelProperty(value = "场景码")
|
||||
private Integer scene;
|
||||
|
||||
@NotNull(message = "mobile参数缺失")
|
||||
@NotEmpty(message = "手机号不能为空")
|
||||
@Length(min = 11, max = 11, message = "手机号只能为11位")
|
||||
@Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式有误")
|
||||
@ApiModelProperty(value = "手机号")
|
||||
private String mobile;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,16 +1,17 @@
|
|||
package com.mdd.front.validate.login;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 微信登录参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("微信登录参数")
|
||||
public class LoginCodeValidate {
|
||||
|
||||
@NotNull(message = "code参数缺失")
|
||||
@ApiModelProperty(value = "微信code", required = true)
|
||||
private String code;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
package com.mdd.front.validate.login;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
|
|
@ -7,21 +9,21 @@ import javax.validation.constraints.NotEmpty;
|
|||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Pattern;
|
||||
|
||||
/**
|
||||
* 手机号登录参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("手机号登录参数")
|
||||
public class LoginPhoneValidate {
|
||||
|
||||
@NotNull(message = "mobile参数缺失")
|
||||
@NotEmpty(message = "手机号不能为空")
|
||||
@Length(min = 11, max = 11, message = "手机号只能为11位")
|
||||
@Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式有误")
|
||||
@ApiModelProperty(value = "手机号", required = true)
|
||||
private String mobile;
|
||||
|
||||
@NotNull(message = "code参数缺失")
|
||||
@NotEmpty(message = "code不能为空")
|
||||
@Length(min = 4, max = 6, message = "验证码长度不符合")
|
||||
@ApiModelProperty(value = "验证码", required = true)
|
||||
private String code;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,24 @@
|
|||
package com.mdd.front.validate.login;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 账号密码登录参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("账号登录参数")
|
||||
public class LoginPwdValidate {
|
||||
|
||||
@NotNull(message = "username参数缺失")
|
||||
@NotEmpty(message = "账号不能为空")
|
||||
@ApiModelProperty(value = "登录账号", required = true)
|
||||
private String username;
|
||||
|
||||
@NotNull(message = "password参数缺失")
|
||||
@NotEmpty(message = "密码不能为空")
|
||||
@ApiModelProperty(value = "登录密码", required = true)
|
||||
private String password;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,25 +1,27 @@
|
|||
package com.mdd.front.validate.login;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 网站扫码登录验证
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("扫码登录验证")
|
||||
public class LoginScanValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotNull(message = "code参数缺失")
|
||||
@NotEmpty(message = "code不能为空")
|
||||
@ApiModelProperty(value = "微信code", required = true)
|
||||
private String code;
|
||||
|
||||
@NotNull(message = "二维码已失效或不存在,请重新操作")
|
||||
@NotEmpty(message = "二维码已失效或不存在,请重新操作")
|
||||
@ApiModelProperty(value = "state码", required = true)
|
||||
private String state;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
package com.mdd.front.validate.login;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
|
|
@ -8,10 +10,8 @@ import javax.validation.constraints.NotNull;
|
|||
import javax.validation.constraints.Pattern;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 注册参数类
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("注册账号参数")
|
||||
public class RegisterValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
@ -20,11 +20,13 @@ public class RegisterValidate implements Serializable {
|
|||
@NotEmpty(message = "账号不能为空")
|
||||
@Length(min = 3, max = 12, message = "账号必须在3~12个字符内")
|
||||
@Pattern(message = "账号应该为3-12位数字、字母组合", regexp="^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{3,12}$")
|
||||
@ApiModelProperty(value = "登录账号", required = true)
|
||||
private String username;
|
||||
|
||||
@NotNull(message = "password参数缺失")
|
||||
@NotEmpty(message = "密码不能为空")
|
||||
@Length(min = 6, max = 12, message = "密码必须在6~12个字符内")
|
||||
@ApiModelProperty(value = "登录密码", required = true)
|
||||
private String password;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,25 +1,27 @@
|
|||
package com.mdd.front.validate.users;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Pattern;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 用户修改密码参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("修改密码参数")
|
||||
public class UserChangePwdValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotNull(message = "password参数缺失")
|
||||
@Pattern(message = "密码必须是6-20字母+数字组合!", regexp="^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$")
|
||||
@ApiModelProperty(value = "新密码", required = true)
|
||||
private String password;
|
||||
|
||||
@NotNull(message = "oldPassword参数缺失")
|
||||
@NotNull(message = "旧密码不能为空")
|
||||
@ApiModelProperty(value = "旧密码", required = true)
|
||||
private String oldPassword="";
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,29 +1,36 @@
|
|||
package com.mdd.front.validate.users;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Pattern;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 忘记密码参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("忘记密码参数")
|
||||
public class UserForgetPwdValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotNull(message = "mobile参数缺失")
|
||||
@NotEmpty(message = "手机号不能为空")
|
||||
@Length(min = 11, max = 11, message = "手机号只能为11位")
|
||||
@Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式有误")
|
||||
@ApiModelProperty(value = "手机号", required = true)
|
||||
private String mobile;
|
||||
|
||||
@NotNull(message = "code参数缺失")
|
||||
@NotEmpty(message = "验证码不能为空")
|
||||
@ApiModelProperty(value = "验证码", required = true)
|
||||
private String code;
|
||||
|
||||
@NotNull(message = "password参数缺失")
|
||||
@NotEmpty(message = "新密码不能为空")
|
||||
@ApiModelProperty(value = "新密码", required = true)
|
||||
private String password;
|
||||
|
||||
}
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
package com.mdd.front.validate.users;
|
||||
|
||||
import com.mdd.common.validator.annotation.StringContains;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
|
|
@ -9,26 +11,27 @@ import javax.validation.constraints.NotNull;
|
|||
import javax.validation.constraints.Pattern;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 绑定或修改手机参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("绑定手机参数")
|
||||
public class UserPhoneBindValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotNull(message = "type参数缺失")
|
||||
@StringContains(values = {"bind", "change"})
|
||||
@ApiModelProperty(value = "操作类型", required = true, example = "bind=绑定,change=修改")
|
||||
private String type;
|
||||
|
||||
@NotNull(message = "mobile参数缺失")
|
||||
@NotEmpty(message = "手机号不能为空")
|
||||
@Length(min = 11, max = 11, message = "手机号只能为11位")
|
||||
@Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式有误")
|
||||
@ApiModelProperty(value = "手机号", required = true)
|
||||
private String mobile;
|
||||
|
||||
@NotNull(message = "code参数缺失")
|
||||
@NotEmpty(message = "验证码不能为空")
|
||||
@ApiModelProperty(value = "验证码", required = true)
|
||||
private String code;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,19 +1,20 @@
|
|||
package com.mdd.front.validate.users;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 获取微信手机号参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("微信手机参数")
|
||||
public class UserPhoneMnpValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotNull(message = "code参数缺失")
|
||||
@ApiModelProperty(value = "微信code", required = true)
|
||||
private String code;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,24 +1,26 @@
|
|||
package com.mdd.front.validate.users;
|
||||
|
||||
import com.mdd.common.validator.annotation.StringContains;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 用户更新参数
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("用户更新参数")
|
||||
public class UserUpdateValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotNull(message = "field参数缺失")
|
||||
@StringContains(values = {"avatar", "username", "nickname", "sex"})
|
||||
@ApiModelProperty(value = "操作字段", required = true, example = "avatar,username,nickname,sex")
|
||||
private String field;
|
||||
|
||||
@NotNull(message = "value参数缺失")
|
||||
@ApiModelProperty(value = "变更的值", required = true)
|
||||
private String value;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +1,21 @@
|
|||
package com.mdd.front.vo.article;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 文章分类Vo
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "文章分类Vo")
|
||||
public class ArticleCateVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer id; // 主键
|
||||
private String name; // 名称
|
||||
@ApiModelProperty(value = "分类ID")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "分类名称")
|
||||
private String name;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,36 @@
|
|||
package com.mdd.front.vo.article;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 文章收藏Vo
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "文章收藏Vo")
|
||||
public class ArticleCollectVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer id; // 主键
|
||||
private Integer articleId; // 文章ID
|
||||
private String title; // 文章标题
|
||||
private String image; // 文章封面
|
||||
private String intro; // 文章简介
|
||||
private Integer visit; // 浏览数量
|
||||
private String createTime; // 创建时间
|
||||
@ApiModelProperty(value = "收藏主键")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "文章ID")
|
||||
private Integer articleId;
|
||||
|
||||
@ApiModelProperty(value = "文章标题")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "文章封面")
|
||||
private String image;
|
||||
|
||||
@ApiModelProperty(value = "文章简介")
|
||||
private String intro;
|
||||
|
||||
@ApiModelProperty(value = "浏览数量")
|
||||
private Integer visit;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private String createTime;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,26 +1,45 @@
|
|||
package com.mdd.front.vo.article;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 文章详情Vo
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "文章详情Vo")
|
||||
public class ArticleDetailVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer id; // 主键
|
||||
private String title; // 文章标题
|
||||
private String image; // 文章封面
|
||||
private String intro; // 文章简介
|
||||
private String summary; // 文章描述
|
||||
private Integer visit; // 浏览数量
|
||||
private String author; // 作者名称
|
||||
private Boolean collect; // 是否收藏
|
||||
private String content; // 文章内容
|
||||
private String createTime; // 创建时间
|
||||
@ApiModelProperty(value = "文章ID")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "文章标题")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "文章封面")
|
||||
private String image;
|
||||
|
||||
@ApiModelProperty(value = "文章简介")
|
||||
private String intro;
|
||||
|
||||
@ApiModelProperty(value = "文章描述")
|
||||
private String summary;
|
||||
|
||||
@ApiModelProperty(value = "浏览数量")
|
||||
private Integer visit;
|
||||
|
||||
@ApiModelProperty(value = "作者名称")
|
||||
private String author;
|
||||
|
||||
@ApiModelProperty(value = "是否收藏")
|
||||
private Boolean collect;
|
||||
|
||||
@ApiModelProperty(value = "文章内容")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private String createTime;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,20 +1,36 @@
|
|||
package com.mdd.front.vo.article;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "文章列表Vo")
|
||||
public class ArticleListedVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "文章ID")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "文章标题")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "文章封面")
|
||||
private String image;
|
||||
|
||||
@ApiModelProperty(value = "文章简介")
|
||||
private String intro;
|
||||
|
||||
@ApiModelProperty(value = "浏览数量")
|
||||
private Integer visit;
|
||||
|
||||
@ApiModelProperty(value = "是否收藏")
|
||||
private Boolean collect;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private String createTime;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,22 @@
|
|||
package com.mdd.front.vo.article;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 资讯中心数据
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "PC资讯中心Vo")
|
||||
public class PcArticleCenterVo implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "ID")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "文章")
|
||||
private Object article;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,31 +1,64 @@
|
|||
package com.mdd.front.vo.article;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* PC端文章详情
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "PC文章详情Vo")
|
||||
public class PcArticleDetailVo implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "文章ID")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "分类ID")
|
||||
private Integer cid;
|
||||
|
||||
@ApiModelProperty(value = "分类名称")
|
||||
private String category;
|
||||
|
||||
@ApiModelProperty(value = "文章标题")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "文章简介")
|
||||
private String intro;
|
||||
|
||||
@ApiModelProperty(value = "文章描述")
|
||||
private String summary;
|
||||
|
||||
@ApiModelProperty(value = "文章封面")
|
||||
private String image;
|
||||
|
||||
@ApiModelProperty(value = "文章内容")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty(value = "文章作者")
|
||||
private String author;
|
||||
|
||||
@ApiModelProperty(value = "浏览数量")
|
||||
private Integer visit;
|
||||
|
||||
@ApiModelProperty(value = "排序编号")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty(value = "是否收藏")
|
||||
private Integer isCollect;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private String createTime;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private String updateTime;
|
||||
|
||||
@ApiModelProperty(value = "上一页")
|
||||
private Object prev;
|
||||
|
||||
@ApiModelProperty(value = "下一页")
|
||||
private Object next;
|
||||
|
||||
@ApiModelProperty(value = "最新推荐")
|
||||
private Object news;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,19 +1,24 @@
|
|||
package com.mdd.front.vo.login;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 系统登录Vo
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "系统登录Vo")
|
||||
public class LoginTokenVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "绑定手机")
|
||||
private Boolean isBindMobile;
|
||||
|
||||
@ApiModelProperty(value = "登录令牌")
|
||||
private String token;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,18 @@
|
|||
package com.mdd.front.vo.login;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 公众号跳转url
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "跳转链接Vo")
|
||||
public class LoginUrlsVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "http链接")
|
||||
private String url;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,36 @@
|
|||
package com.mdd.front.vo.users;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 用户个人中心Vo
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "个人中心Vo")
|
||||
public class UserCenterVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "用户编号")
|
||||
private Integer sn;
|
||||
|
||||
@ApiModelProperty(value = "用户头像")
|
||||
private String avatar;
|
||||
|
||||
@ApiModelProperty(value = "真实姓名")
|
||||
private String realName;
|
||||
|
||||
@ApiModelProperty(value = "用户昵称")
|
||||
private String nickname;
|
||||
|
||||
@ApiModelProperty(value = "用户账号")
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty(value = "手机号码")
|
||||
private String mobile;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,28 +1,51 @@
|
|||
package com.mdd.front.vo.users;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 用户个人中心Vo
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "个人信息Vo")
|
||||
public class UserInfoVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "用户编号")
|
||||
private Integer sn;
|
||||
|
||||
@ApiModelProperty(value = "用户头像")
|
||||
private String avatar;
|
||||
|
||||
@ApiModelProperty(value = "真实姓名")
|
||||
private String realName;
|
||||
|
||||
@ApiModelProperty(value = "用户昵称")
|
||||
private String nickname;
|
||||
|
||||
@ApiModelProperty(value = "用户账号")
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty(value = "手机号码")
|
||||
private String mobile;
|
||||
|
||||
@ApiModelProperty(value = "用户性别")
|
||||
private String sex;
|
||||
|
||||
@ApiModelProperty(value = "是否设置密码")
|
||||
private Boolean isPassword;
|
||||
|
||||
@ApiModelProperty(value = "是否绑定微信")
|
||||
private Boolean isBindMnp;
|
||||
|
||||
@ApiModelProperty(value = "版本信息")
|
||||
private String version;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private String createTime;
|
||||
|
||||
public void setSex(Integer sex) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue