Commit 9cda4b10 authored by 技术部-任文超's avatar 技术部-任文超

在重置密码的地方添加用户是否已存在的验证逻辑,在短信验证码通过验证后,在用户未注册时添加提醒(此处暂不实现快速注册)

parent ed0c0115
...@@ -415,6 +415,10 @@ public class UserController implements IBaseController { ...@@ -415,6 +415,10 @@ public class UserController implements IBaseController {
return JsonResult.buildErrorStateResult("密码应为6-12位", null); return JsonResult.buildErrorStateResult("密码应为6-12位", null);
} }
smsValidForRegister(phoneNo, verificationCode); smsValidForRegister(phoneNo, verificationCode);
if (userService.exist(phoneNo)) {
LOGGER.info("修改密码失败,该手机号尚未注册, registerFrom:{}, phoneNo:{}", registerFrom, phoneNo);
return JsonResult.buildErrorStateResult("该手机号尚未注册", null);
}
if (!userService.resetPassword(phoneNo, password)) { if (!userService.resetPassword(phoneNo, password)) {
return JsonResult.buildErrorStateResult("修改密码失败", null); return JsonResult.buildErrorStateResult("修改密码失败", null);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment