update 完善auth服务 重构用户注册流程 补全接口文档
parent
27087e5d1e
commit
ba635272fe
@ -1,26 +1,38 @@
|
||||
package com.ruoyi.auth.form;
|
||||
|
||||
import com.ruoyi.common.core.constant.UserConstants;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 用户登录对象
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@ApiModel("用户登录对象")
|
||||
public class LoginBody {
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
@NotBlank(message = "用户名不能为空")
|
||||
@Length(min = UserConstants.USERNAME_MIN_LENGTH, max = UserConstants.USERNAME_MAX_LENGTH, message = "账户长度必须在2到20个字符之间")
|
||||
@ApiModelProperty(value = "用户名")
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 用户密码
|
||||
*/
|
||||
@NotBlank(message = "密码不能为空")
|
||||
@Length(min = UserConstants.PASSWORD_MIN_LENGTH, max = UserConstants.PASSWORD_MAX_LENGTH, message = "密码长度必须在5到20个字符之间")
|
||||
@ApiModelProperty(value = "用户密码")
|
||||
private String password;
|
||||
|
||||
}
|
||||
|
@ -1,10 +1,21 @@
|
||||
package com.ruoyi.auth.form;
|
||||
|
||||
/**
|
||||
* 用户注册对象
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class RegisterBody extends LoginBody {
|
||||
|
||||
}
|
||||
package com.ruoyi.auth.form;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 用户注册对象
|
||||
*
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel("用户注册对象")
|
||||
public class RegisterBody extends LoginBody {
|
||||
|
||||
@ApiModelProperty(value = "用户类型")
|
||||
private String userType;
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue