mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-24 16:05:08 +08:00
🔧 简化 permission 模块的 VO
This commit is contained in:
@ -1,8 +1,11 @@
|
||||
package cn.iocoder.yudao.module.system.enums.permission;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* 数据范围枚举类
|
||||
*
|
||||
@ -12,7 +15,7 @@ import lombok.Getter;
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum DataScopeEnum {
|
||||
public enum DataScopeEnum implements IntArrayValuable {
|
||||
|
||||
ALL(1), // 全部数据权限
|
||||
|
||||
@ -27,4 +30,11 @@ public enum DataScopeEnum {
|
||||
*/
|
||||
private final Integer scope;
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DataScopeEnum::getScope).toArray();
|
||||
|
||||
@Override
|
||||
public int[] array() {
|
||||
return ARRAYS;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user