【修复】修复 #I6T57A 短信验证码校验bug

pull/114/head v2.2.8
xuyuxiang 2023-04-25 15:51:46 +08:00
parent a783d8fc1a
commit 1297fede62
1 changed files with 10 additions and 9 deletions

View File

@ -175,15 +175,16 @@ public class AuthServiceImpl implements AuthService {
}
// 执行校验验证码
validValidCode(phoneOrEmail, validCode, validCodeReqNo);
}
// 根据手机号获取用户信息判断用户是否存在根据B端或C端判断
if(SaClientTypeEnum.B.getValue().equals(type)) {
if(ObjectUtil.isEmpty(loginUserApi.getUserByPhone(phoneOrEmail))) {
throw new CommonException(AuthExceptionEnum.PHONE_ERROR.getValue());
}
} else {
if(ObjectUtil.isEmpty(clientLoginUserApi.getClientUserByPhone(phoneOrEmail))) {
throw new CommonException(AuthExceptionEnum.PHONE_ERROR.getValue());
// 根据手机号获取用户信息判断用户是否存在根据B端或C端判断
if(SaClientTypeEnum.B.getValue().equals(type)) {
if(ObjectUtil.isEmpty(loginUserApi.getUserByPhone(phoneOrEmail))) {
throw new CommonException(AuthExceptionEnum.PHONE_ERROR.getValue());
}
} else {
if(ObjectUtil.isEmpty(clientLoginUserApi.getClientUserByPhone(phoneOrEmail))) {
throw new CommonException(AuthExceptionEnum.PHONE_ERROR.getValue());
}
}
}
}