mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 05:09:21 +08:00
fix(ecom-dmb): 用户状态判断从!=0修正为!=1,与数据库设计(1-正常/0-禁用)保持一致
This commit is contained in:
+1
-1
@@ -66,7 +66,7 @@ public class UserMenuServiceImpl implements UserMenuService {
|
||||
}
|
||||
|
||||
// 检查用户状态
|
||||
if (user.getStatus() != 0) {
|
||||
if (user.getStatus() != 1) {
|
||||
throw new RuntimeException("用户状态异常");
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -97,7 +97,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserPO> implements
|
||||
user.setPassword(passwordEncoder.encode(registerDTO.getPassword()));
|
||||
user.setRealName("用户" + System.currentTimeMillis()); // 默认用户名
|
||||
user.setRole("user"); // 默认角色
|
||||
user.setStatus(0); // 正常状态
|
||||
user.setStatus(1); // 正常状态
|
||||
user.setPwdSecurityLevel(0); // 初始密码安全级别
|
||||
user.setPwdUpdateTime(LocalDateTime.now());
|
||||
|
||||
@@ -127,7 +127,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserPO> implements
|
||||
}
|
||||
|
||||
// 检查用户状态
|
||||
if (user.getStatus() != 0) {
|
||||
if (user.getStatus() != 1) {
|
||||
throw new BusinessException("用户状态异常,无法登录");
|
||||
}
|
||||
|
||||
@@ -347,7 +347,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserPO> implements
|
||||
}
|
||||
|
||||
// 检查用户状态
|
||||
if (user.getStatus() != 0) {
|
||||
if (user.getStatus() != 1) {
|
||||
throw new BusinessException("用户状态异常,无法刷新令牌");
|
||||
}
|
||||
|
||||
@@ -369,7 +369,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, UserPO> implements
|
||||
}
|
||||
|
||||
// 检查目标用户状态
|
||||
if (targetUser.getStatus() != 0) {
|
||||
if (targetUser.getStatus() != 1) {
|
||||
throw new BusinessException("目标用户状态异常,无法切换");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user