fix 发送手机验证码没有解密手机号

This commit is contained in:
lijiarao
2021-09-28 11:49:06 +08:00
parent 0d797622d1
commit 79b0b141be
2 changed files with 4 additions and 6 deletions
@@ -603,15 +603,14 @@ public class LoginController {
@ApiOperation(value = "发送手机号验证码")
@GetMapping(value = "/sendVerificationCode")
public Result<?> sendVerificationCode(String phone) {
phone = PasswordUtil.encrypt(phone);
LambdaQueryWrapper<SysUser> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(SysUser::getPhone, phone);
queryWrapper.eq(SysUser::getPhone, PasswordUtil.encrypt(phone));
SysUser sysUser = sysUserService.getOne(queryWrapper);
if (Objects.isNull(sysUser)){
throw new JeroBootException("手机号不存在");
}
sysBaseAPI.sendVerificationCode(phone,"2",null,null);
String string = redisUtil.get("_verification:_phone:" + PasswordUtil.decrypt(phone)).toString();
String string = redisUtil.get("_verification:_phone:" + phone).toString();
return Result.OK(string);
}
}