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

This commit is contained in:
xuyuxiang
2023-04-25 15:51:46 +08:00
parent a783d8fc1a
commit 1297fede62

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());
}
}
}
}