From f298ad1f3182fa5a76a8b28e67336796f6d814fe Mon Sep 17 00:00:00 2001 From: Gary Date: Mon, 4 Mar 2024 17:44:49 +0800 Subject: [PATCH] 1.prevent user login when user status is disable --- .../src/main/java/com/luoo/user/service/UserInfoService.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/luoo_user/src/main/java/com/luoo/user/service/UserInfoService.java b/luoo_user/src/main/java/com/luoo/user/service/UserInfoService.java index 8a8ffad..adb9536 100644 --- a/luoo_user/src/main/java/com/luoo/user/service/UserInfoService.java +++ b/luoo_user/src/main/java/com/luoo/user/service/UserInfoService.java @@ -210,6 +210,9 @@ public class UserInfoService { user.setLastUseDeviceBrand(userInfo.getLastUseDeviceBrand()); user.setLastLoginIp(userInfo.getLastLoginIp()); } + if (!UserStatusEnum.ENABLE.getStatus().equals(userInfo.getStatus())) { + return null; + } user.setLastLoginTime(new Date()); userInfoDao.save(user); return Constants.TOKEN_PREFIX