Commit e1f98c977787ead93089ea5dd654d8265dae3252
1 parent
30d0b10c
chore: 使用 CommonStatusEnum.isDisable() 判断会员账户状态
Showing
1 changed file
with
2 additions
and
2 deletions
yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/auth/MemberAuthServiceImpl.java
| ... | ... | @@ -89,7 +89,7 @@ public class MemberAuthServiceImpl implements MemberAuthService { |
| 89 | 89 | Assert.notNull(user, "获取用户失败,结果为空"); |
| 90 | 90 | |
| 91 | 91 | // 校验是否禁用 |
| 92 | - if (ObjectUtil.notEqual(user.getStatus(), CommonStatusEnum.ENABLE.getStatus())) { | |
| 92 | + if (CommonStatusEnum.isDisable(user.getStatus())) { | |
| 93 | 93 | createLoginLog(user.getId(), reqVO.getMobile(), LoginLogTypeEnum.LOGIN_SMS, LoginResultEnum.USER_DISABLED); |
| 94 | 94 | throw exception(AUTH_LOGIN_USER_DISABLED); |
| 95 | 95 | } |
| ... | ... | @@ -183,7 +183,7 @@ public class MemberAuthServiceImpl implements MemberAuthService { |
| 183 | 183 | throw exception(AUTH_LOGIN_BAD_CREDENTIALS); |
| 184 | 184 | } |
| 185 | 185 | // 校验是否禁用 |
| 186 | - if (ObjectUtil.notEqual(user.getStatus(), CommonStatusEnum.ENABLE.getStatus())) { | |
| 186 | + if (CommonStatusEnum.isDisable(user.getStatus())) { | |
| 187 | 187 | createLoginLog(user.getId(), mobile, logTypeEnum, LoginResultEnum.USER_DISABLED); |
| 188 | 188 | throw exception(AUTH_LOGIN_USER_DISABLED); |
| 189 | 189 | } | ... | ... |