chore: 使用 CommonStatusEnum.isDisable() 判断会员账户状态
This commit is contained in:
parent
30d0b10c99
commit
e1f98c9777
|
@ -89,7 +89,7 @@ public class MemberAuthServiceImpl implements MemberAuthService {
|
|||
Assert.notNull(user, "获取用户失败,结果为空");
|
||||
|
||||
// 校验是否禁用
|
||||
if (ObjectUtil.notEqual(user.getStatus(), CommonStatusEnum.ENABLE.getStatus())) {
|
||||
if (CommonStatusEnum.isDisable(user.getStatus())) {
|
||||
createLoginLog(user.getId(), reqVO.getMobile(), LoginLogTypeEnum.LOGIN_SMS, LoginResultEnum.USER_DISABLED);
|
||||
throw exception(AUTH_LOGIN_USER_DISABLED);
|
||||
}
|
||||
|
@ -183,7 +183,7 @@ public class MemberAuthServiceImpl implements MemberAuthService {
|
|||
throw exception(AUTH_LOGIN_BAD_CREDENTIALS);
|
||||
}
|
||||
// 校验是否禁用
|
||||
if (ObjectUtil.notEqual(user.getStatus(), CommonStatusEnum.ENABLE.getStatus())) {
|
||||
if (CommonStatusEnum.isDisable(user.getStatus())) {
|
||||
createLoginLog(user.getId(), mobile, logTypeEnum, LoginResultEnum.USER_DISABLED);
|
||||
throw exception(AUTH_LOGIN_USER_DISABLED);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue