创建管理员时,头像无法存储问题处理
This commit is contained in:
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
|
||||
/**
|
||||
@@ -21,18 +22,22 @@ public class AdminUser extends BaseEntity {
|
||||
private static final long serialVersionUID = 2918352800205024873L;
|
||||
|
||||
@ApiModelProperty(value = "用户名")
|
||||
@Length(max = 20,message = "用户名长度不能超过20个字符")
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty(value = "密码")
|
||||
private String password;
|
||||
|
||||
@ApiModelProperty(value = "昵称")
|
||||
@Length(max = 10,message = "昵称长度不能超过10个字符")
|
||||
private String nickName;
|
||||
|
||||
@ApiModelProperty(value = "手机")
|
||||
@Length(max = 11,message = "手机号长度不能超过11")
|
||||
private String mobile;
|
||||
|
||||
@ApiModelProperty(value = "邮件")
|
||||
@Length(max = 100,message = "又想长度不能超过100")
|
||||
private String email;
|
||||
|
||||
@ApiModelProperty(value = "用户头像")
|
||||
|
||||
@@ -4,6 +4,7 @@ import cn.lili.mybatis.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
|
||||
@@ -19,23 +20,29 @@ public class AdminUserDTO extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "用户名")
|
||||
@NotEmpty(message = "用户名不能为空")
|
||||
@Length(max = 20,message = "用户名长度不能超过20个字符")
|
||||
private String username;
|
||||
|
||||
@NotEmpty(message = "密码不能为空")
|
||||
@ApiModelProperty(value = "密码")
|
||||
private String password;
|
||||
|
||||
@ApiModelProperty(value = "昵称")
|
||||
@Length(max = 10,message = "昵称长度不能超过10个字符")
|
||||
private String nickName;
|
||||
|
||||
@ApiModelProperty(value = "手机")
|
||||
@Length(max = 11,message = "手机号长度不能超过11")
|
||||
private String mobile;
|
||||
|
||||
@ApiModelProperty(value = "邮件")
|
||||
@Length(max = 100,message = "又想长度不能超过100")
|
||||
private String email;
|
||||
|
||||
@ApiModelProperty(value = "头像")
|
||||
private String avatar;
|
||||
|
||||
@ApiModelProperty(value = "描述/详情/备注")
|
||||
private String description;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user