|
@@ -241,21 +241,21 @@ public class LoginService extends ServiceImpl<PersonnelMapper, Personnel> {
|
|
ThrowException.throwXiaoShiException("请正确填写账号与邮箱");
|
|
ThrowException.throwXiaoShiException("请正确填写账号与邮箱");
|
|
}
|
|
}
|
|
|
|
|
|
- //检查账号是否存在,若不存在则返回提示"账号不存在,请检查账号是否输入正确"
|
|
|
|
|
|
+ //检查账号是否存在,若不存在则返回提示"账号错误,请检查账号是否输入正确"
|
|
Personnel personnel = this.getOne(new LambdaQueryWrapper<Personnel>().eq(Personnel::getPersonnelUserName, reSetPasswordDTO.getPersonnelUserName()).last("LIMIT 1"));
|
|
Personnel personnel = this.getOne(new LambdaQueryWrapper<Personnel>().eq(Personnel::getPersonnelUserName, reSetPasswordDTO.getPersonnelUserName()).last("LIMIT 1"));
|
|
if (personnel == null) {
|
|
if (personnel == null) {
|
|
- ThrowException.throwXiaoShiException("该账号不存在或已被禁用,请检查账号是否输入正确");
|
|
|
|
|
|
+ ThrowException.throwXiaoShiException("账号错误,请检查账号是否输入正确");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- //检查邮箱是否存在,若没有邮箱则返回提示"该账号未绑定邮箱无法重置密码,您可在登陆后进行密码重置"
|
|
|
|
-// String personnelEmail = personnel.getPersonnelEmail();
|
|
|
|
-// if (personnelEmail == null || personnelEmail.trim().equals("")) {
|
|
|
|
-// ThrowException.throwXiaoShiException("该账号未绑定邮箱无法重置密码,您也可在登陆后进行密码重置");
|
|
|
|
-// }
|
|
|
|
|
|
+ //检查邮箱是否存在,若没有邮箱则返回提示"该账号未绑定邮箱无法重置密码,请联系管理员"
|
|
|
|
+ String personnelEmail = personnel.getPersonnelEmail();
|
|
|
|
+ if (personnelEmail == null || personnelEmail.trim().equals("")) {
|
|
|
|
+ ThrowException.throwXiaoShiException("该账号未绑定邮箱无法重置密码,请联系管理员");
|
|
|
|
+ }
|
|
|
|
|
|
- //检查邮箱是否正确,若错误则返回提示"该账号未绑定邮箱无法重置密码,您可在登陆后进行密码重置"
|
|
|
|
- if (!reSetPasswordDTO.getPersonnelEmail().equals(personnel.getPersonnelEmail())) {
|
|
|
|
|
|
+ //检查邮箱是否正确,若错误则返回提示"邮箱不正确,请检查后重新填写"
|
|
|
|
+ if (!reSetPasswordDTO.getPersonnelEmail().equals(personnelEmail)) {
|
|
ThrowException.throwXiaoShiException("邮箱不正确,请检查后重新填写");
|
|
ThrowException.throwXiaoShiException("邮箱不正确,请检查后重新填写");
|
|
}
|
|
}
|
|
|
|
|