fix 发送手机验证码没有解密手机号
This commit is contained in:
+2
-3
@@ -258,15 +258,14 @@ public class CompanyLoginController {
|
|||||||
@ApiOperation(value = "发送手机号验证码")
|
@ApiOperation(value = "发送手机号验证码")
|
||||||
@GetMapping(value = "/sendVerificationCode")
|
@GetMapping(value = "/sendVerificationCode")
|
||||||
public Result<?> sendVerificationCode(String phone) {
|
public Result<?> sendVerificationCode(String phone) {
|
||||||
phone = PasswordUtil.encrypt(phone);
|
|
||||||
LambdaQueryWrapper<PayContactsManagement> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<PayContactsManagement> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(PayContactsManagement::getPhone, phone);
|
queryWrapper.eq(PayContactsManagement::getPhone, PasswordUtil.encrypt(phone));
|
||||||
PayContactsManagement contactsManagement = payContactsManagementService.getOne(queryWrapper);
|
PayContactsManagement contactsManagement = payContactsManagementService.getOne(queryWrapper);
|
||||||
if (Objects.isNull(contactsManagement)){
|
if (Objects.isNull(contactsManagement)){
|
||||||
throw new JeroBootException("手机号不是企业联系人");
|
throw new JeroBootException("手机号不是企业联系人");
|
||||||
}
|
}
|
||||||
sysBaseAPI.sendVerificationCode(phone,"2",null,null);
|
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);
|
return Result.OK(string);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-3
@@ -603,15 +603,14 @@ public class LoginController {
|
|||||||
@ApiOperation(value = "发送手机号验证码")
|
@ApiOperation(value = "发送手机号验证码")
|
||||||
@GetMapping(value = "/sendVerificationCode")
|
@GetMapping(value = "/sendVerificationCode")
|
||||||
public Result<?> sendVerificationCode(String phone) {
|
public Result<?> sendVerificationCode(String phone) {
|
||||||
phone = PasswordUtil.encrypt(phone);
|
|
||||||
LambdaQueryWrapper<SysUser> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<SysUser> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(SysUser::getPhone, phone);
|
queryWrapper.eq(SysUser::getPhone, PasswordUtil.encrypt(phone));
|
||||||
SysUser sysUser = sysUserService.getOne(queryWrapper);
|
SysUser sysUser = sysUserService.getOne(queryWrapper);
|
||||||
if (Objects.isNull(sysUser)){
|
if (Objects.isNull(sysUser)){
|
||||||
throw new JeroBootException("手机号不存在");
|
throw new JeroBootException("手机号不存在");
|
||||||
}
|
}
|
||||||
sysBaseAPI.sendVerificationCode(phone,"2",null,null);
|
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);
|
return Result.OK(string);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user