mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2025-01-18 19:20:05 +08:00
chore: 使用 CommonStatusEnum.isDisable() 判断会员账户状态
This commit is contained in:
parent
30d0b10c99
commit
e1f98c9777
@ -89,7 +89,7 @@ public class MemberAuthServiceImpl implements MemberAuthService {
|
|||||||
Assert.notNull(user, "获取用户失败,结果为空");
|
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);
|
createLoginLog(user.getId(), reqVO.getMobile(), LoginLogTypeEnum.LOGIN_SMS, LoginResultEnum.USER_DISABLED);
|
||||||
throw exception(AUTH_LOGIN_USER_DISABLED);
|
throw exception(AUTH_LOGIN_USER_DISABLED);
|
||||||
}
|
}
|
||||||
@ -183,7 +183,7 @@ public class MemberAuthServiceImpl implements MemberAuthService {
|
|||||||
throw exception(AUTH_LOGIN_BAD_CREDENTIALS);
|
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);
|
createLoginLog(user.getId(), mobile, logTypeEnum, LoginResultEnum.USER_DISABLED);
|
||||||
throw exception(AUTH_LOGIN_USER_DISABLED);
|
throw exception(AUTH_LOGIN_USER_DISABLED);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user