多模块重构 3:security 实现多用户的认证支持

This commit is contained in:
YunaiV
2022-01-29 00:44:03 +08:00
parent 928b7dbe23
commit e9efff7076
23 changed files with 279 additions and 184 deletions

View File

@ -1,5 +1,7 @@
package cn.iocoder.yudao.framework.common.enums;
import cn.hutool.core.lang.Matcher;
import cn.hutool.core.util.ArrayUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;
@ -22,4 +24,8 @@ public enum UserTypeEnum {
*/
private final String name;
public static UserTypeEnum valueOf(Integer value) {
return ArrayUtil.firstMatch(userType -> userType.getValue().equals(value), UserTypeEnum.values());
}
}