多模块重构 4:system 模块的调整,实现 social API~~

This commit is contained in:
YunaiV
2022-01-30 21:23:45 +08:00
parent ab6ec2f0ed
commit add08b1ecd
132 changed files with 1649 additions and 1587 deletions

View File

@ -1,20 +1,24 @@
package cn.iocoder.yudao.framework.common.enums;
import cn.hutool.core.lang.Matcher;
import cn.hutool.core.util.ArrayUtil;
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.Arrays;
/**
* 全局用户类型枚举
*/
@AllArgsConstructor
@Getter
public enum UserTypeEnum {
public enum UserTypeEnum implements IntArrayValuable {
MEMBER(1, "会员"), // 面向 c 端,普通用户
ADMIN(2, "管理员"); // 面向 b 端,管理后台
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(UserTypeEnum::getValue).toArray();
/**
* 类型
*/
@ -28,4 +32,8 @@ public enum UserTypeEnum {
return ArrayUtil.firstMatch(userType -> userType.getValue().equals(value), UserTypeEnum.values());
}
@Override
public int[] array() {
return ARRAYS;
}
}