密码修改验证处理
This commit is contained in:
parent
2a97679c39
commit
1e233d1207
|
|
@ -360,6 +360,9 @@ public class SystemAuthAdminServiceImpl implements ISystemAuthAdminService {
|
|||
if (StringUtils.isNotNull(upInfoValidate.getPassword()) && StringUtils.isNotEmpty(upInfoValidate.getPassword())) {
|
||||
String currPassword = ToolUtils.makeMd5(upInfoValidate.getCurrPassword() + model.getSalt());
|
||||
Assert.isFalse(!currPassword.equals(model.getPassword()), "当前密码不正确!");
|
||||
if (upInfoValidate.getPassword().length() > 64) {
|
||||
throw new OperateException("密码不能超出64个字符");
|
||||
}
|
||||
String salt = ToolUtils.randomString(5);
|
||||
String pwd = ToolUtils.makeMd5( upInfoValidate.getPassword().trim() + salt);
|
||||
model.setPassword(pwd);
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ public class SystemAdminLoginsValidate implements Serializable {
|
|||
private String username;
|
||||
|
||||
@NotEmpty(message = "密码不能为空")
|
||||
@Length(min = 6, max = 18, message = "账号或密码错误")
|
||||
@Length(min = 6, max = 64, message = "账号或密码错误")
|
||||
@ApiModelProperty(value = "登录密码", required = true)
|
||||
private String password;
|
||||
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ public class SystemAdminUpInfoValidate implements Serializable {
|
|||
@ApiModelProperty(value = "用户昵称")
|
||||
private String nickname;
|
||||
|
||||
@Length(max = 32, message = "密码必须在6~32个字符内")
|
||||
@Length(max = 64, message = "密码必须在6~32个字符内")
|
||||
private String password="";
|
||||
|
||||
@Length(max = 32, message = "当前密码错误")
|
||||
@Length(max = 64, message = "当前密码错误")
|
||||
private String currPassword="";
|
||||
|
||||
@Length(max = 200, message = "头像不能超出200个字符")
|
||||
|
|
|
|||
Loading…
Reference in New Issue