Pre Merge pull request !273 from Baymax/dev

This commit is contained in:
Baymax 2023-01-08 07:57:48 +00:00 committed by Gitee
commit 8f13c038b1
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 5 additions and 1 deletions

View File

@ -34,4 +34,8 @@ public enum UserType {
} }
throw new RuntimeException("'UserType' not found By " + str); throw new RuntimeException("'UserType' not found By " + str);
} }
public static String[] getUserTypeValue() {
return new String[]{SYS_USER.getUserType(), APP_USER.getUserType()};
}
} }

View File

@ -82,7 +82,7 @@ public class LoginHelper {
if (ObjectUtil.isNull(loginUser)) { if (ObjectUtil.isNull(loginUser)) {
String loginId = StpUtil.getLoginIdAsString(); String loginId = StpUtil.getLoginIdAsString();
String[] strs = StringUtils.split(loginId, JOIN_CODE); String[] strs = StringUtils.split(loginId, JOIN_CODE);
if (!ArrayUtil.containsAny(strs, UserType.values())) { if (!ArrayUtil.containsAny(strs, UserType.getUserTypeValue())) {
throw new UtilException("登录用户: LoginId异常 => " + loginId); throw new UtilException("登录用户: LoginId异常 => " + loginId);
} }
// 用户id在总是在最后 // 用户id在总是在最后