mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-20 18:15:56 +08:00
Pre Merge pull request !273 from Baymax/dev
This commit is contained in:
commit
8f13c038b1
@ -34,4 +34,8 @@ public enum UserType {
|
||||
}
|
||||
throw new RuntimeException("'UserType' not found By " + str);
|
||||
}
|
||||
|
||||
public static String[] getUserTypeValue() {
|
||||
return new String[]{SYS_USER.getUserType(), APP_USER.getUserType()};
|
||||
}
|
||||
}
|
||||
|
||||
@ -82,7 +82,7 @@ public class LoginHelper {
|
||||
if (ObjectUtil.isNull(loginUser)) {
|
||||
String loginId = StpUtil.getLoginIdAsString();
|
||||
String[] strs = StringUtils.split(loginId, JOIN_CODE);
|
||||
if (!ArrayUtil.containsAny(strs, UserType.values())) {
|
||||
if (!ArrayUtil.containsAny(strs, UserType.getUserTypeValue())) {
|
||||
throw new UtilException("登录用户: LoginId异常 => " + loginId);
|
||||
}
|
||||
// 用户id在总是在最后
|
||||
|
||||
Loading…
Reference in New Issue
Block a user