手机验证码登录即注册
parent
d14191e8dc
commit
c5a16c07f9
|
@ -97,12 +97,7 @@ public class MemberAuthServiceImpl implements MemberAuthService {
|
||||||
smsCodeApi.useSmsCode(AuthConvert.INSTANCE.convert(reqVO, SmsSceneEnum.MEMBER_LOGIN.getScene(), userIp));
|
smsCodeApi.useSmsCode(AuthConvert.INSTANCE.convert(reqVO, SmsSceneEnum.MEMBER_LOGIN.getScene(), userIp));
|
||||||
|
|
||||||
// 获得获得注册用户
|
// 获得获得注册用户
|
||||||
// 校验账号是否存在
|
MemberUserDO user = userService.createUserIfAbsent(reqVO.getMobile(),reqVO.getMobile(), userIp,reqVO.getPromoterId());
|
||||||
MemberUserDO user = userService.getUserByMobile(reqVO.getMobile());
|
|
||||||
if (user == null) {
|
|
||||||
createLoginLog(null, reqVO.getMobile(), LoginLogTypeEnum.LOGIN_SMS, LoginResultEnum.BAD_CREDENTIALS);
|
|
||||||
throw exception(AUTH_LOGIN_BAD_CREDENTIALS);
|
|
||||||
}
|
|
||||||
// 校验是否禁用
|
// 校验是否禁用
|
||||||
if (ObjectUtil.notEqual(user.getStatus(), CommonStatusEnum.ENABLE.getStatus())) {
|
if (ObjectUtil.notEqual(user.getStatus(), CommonStatusEnum.ENABLE.getStatus())) {
|
||||||
createLoginLog(user.getId(), reqVO.getMobile(), LoginLogTypeEnum.LOGIN_SMS, LoginResultEnum.USER_DISABLED);
|
createLoginLog(user.getId(), reqVO.getMobile(), LoginLogTypeEnum.LOGIN_SMS, LoginResultEnum.USER_DISABLED);
|
||||||
|
|
Loading…
Reference in New Issue