This commit is contained in:
xiangwb
2018-04-10 17:33:38 +08:00
parent b95e4ee0ce
commit a7d13b5eab
5 changed files with 10 additions and 10 deletions
@@ -6,7 +6,7 @@ import lombok.Data;
* 项目名称: boot-module-demo
* 创建时间: 2017/11/20 17:18
* 作者: xiangwb
* 说明:
* 说明: 用户excel导出信息
*/
@Data
public class UserDto {
@@ -29,8 +29,8 @@ public class SysAuthority extends BaseEntity {
private String enable;
@ApiModelProperty(value = "url地址", required = true)
private String url;
@ApiModelProperty(value = "父键", required = true)
@Column(name = "parent_id")
@ApiModelProperty(value = "父ID", required = true)
private String parentId;
@ApiModelProperty(value = "类型(1菜单|2按钮)", example = "2", required = true)
private Integer type;
@@ -31,8 +31,8 @@ public class SysConfig extends BaseEntity {
@ApiModelProperty(value = "配置项的值", example = "{}", required = true)
private String value;
@NotBlank(message = "配置项的name不能为空")
@ApiModelProperty(value = "配置项的描述(名称)", example = "邮箱配置", required = true)
@Length(min = 1, max = 20, message = "value长度为1-20")
@ApiModelProperty(value = "配置项的描述(名称)", example = "邮箱配置", required = true)
private String name;
@NotBlank(message = "是否启用不能为空")
@Pattern(regexp = "[Y|N]", message = "是否启用格式为Y|N")
@@ -26,22 +26,22 @@ import java.util.List;
public class SysUser extends BaseEntity {
private static final long serialVersionUID = -2447528751353457021L;
public static String table = "sys_user_info";
@ApiModelProperty(value = "用户名", required = true)
@NotBlank(message = "用户名不能为空")
@Length(min = 1, max = 20, message = "用户名长度为1-20")
@ApiModelProperty(value = "用户名", required = true)
@Column(name = "user_name")
private String userName;
@ApiModelProperty(value = "姓名", required = true)
@NotBlank(message = "姓名不能为空")
@Length(min = 1, max = 20, message = "姓名长度为1-5")
@ApiModelProperty(value = "姓名", required = true)
private String name;
@ApiModelProperty(value = "邮箱", example = "@163.com", required = true)
@NotBlank(message = "邮箱不能为空")
@Email(message = "邮箱格式有误")
@ApiModelProperty(value = "邮箱", example = "@163.com", required = true)
private String mail;
@ApiModelProperty(value = "性别(0|1)", example = "1", required = true)
@NotBlank(message = "性别不能为空")
@Pattern(regexp = "[01]", message = "性别格式为0|1,0代表女,1代表男")
@ApiModelProperty(value = "性别(0|1)", example = "1", required = true)
private String sex;
@ApiModelProperty(value = "盐值", hidden = true)
private String salt;
@@ -23,18 +23,18 @@ public class SwaggerConfig {
@Bean
public Docket sysDocket() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(sysApiInf())
.apiInfo(sysApiInfo())
.select()
.apis(RequestHandlerSelectors.basePackage("com.xwbing.controller.sys"))
.paths(PathSelectors.any())
.build();
}
private ApiInfo sysApiInf() {
private ApiInfo sysApiInfo() {
return new ApiInfoBuilder()
.title("RESTful API Document")
.description("系统接口文档")
.termsOfServiceUrl("http://localhost:8080/swagger-ui.html")
.termsOfServiceUrl("http://localhost:8088/doc")
.contact(new Contact("项伟兵", "https://github.com/xiangwbs/boot-module-pro.git", "xiangwbs@163.com"))
.version("1.0.0")
.build();