【优化】忘记密码
This commit is contained in:
@@ -264,8 +264,9 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
||||
}
|
||||
|
||||
String codeKey = String.format("verify_code:%s:%s", "forget", request.getAccount());
|
||||
String checkCode = redisUtil.get(codeKey).toString();
|
||||
if(!checkCode.equalsIgnoreCase(request.getVerificationCode())) {
|
||||
Object checkCode = redisUtil.get(codeKey);
|
||||
|
||||
if(checkCode == null || !request.getVerificationCode().equalsIgnoreCase(checkCode.toString())) {
|
||||
throw new RuntimeException(I18nUtil.getMessage("error.verify.code.invalid"));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user