mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-24 07:19:46 +08:00
update 数据库更改 对接多用户体系
This commit is contained in:
@ -19,7 +19,9 @@ import lombok.NoArgsConstructor;
|
||||
@NoArgsConstructor(access = AccessLevel.PRIVATE)
|
||||
public class LoginHelper {
|
||||
|
||||
private static final String LOGIN_USER_KEY = "loginUser";
|
||||
public static final String JOIN_CODE = ":";
|
||||
public static final String LOGIN_USER_KEY = "loginUser";
|
||||
|
||||
private static final ThreadLocal<LoginUser> LOGIN_CACHE = new ThreadLocal<>();
|
||||
|
||||
/**
|
||||
@ -80,7 +82,9 @@ public class LoginHelper {
|
||||
String userId = null;
|
||||
for (UserType value : UserType.values()) {
|
||||
if (StringUtils.contains(loginId, value.getUserType())) {
|
||||
userId = StringUtils.replace(loginId, value.getUserType(), StringUtils.EMPTY);
|
||||
String[] strs = StringUtils.split(loginId, JOIN_CODE);
|
||||
// 用户id在总是在最后
|
||||
userId = strs[strs.length - 1];
|
||||
}
|
||||
}
|
||||
if (StringUtils.isBlank(userId)) {
|
||||
|
Reference in New Issue
Block a user