1. system 提供新的 Resource 相关接口

2. admin-web 接入新的 Resource 相关接口
This commit is contained in:
YunaiV
2020-04-27 19:48:58 +08:00
parent caf605063c
commit f7157d283c
34 changed files with 684 additions and 368 deletions

View File

@@ -41,12 +41,12 @@ public enum SystemErrorCodeEnum implements ServiceExceptionUtil.Enumerable {
// ADMIN_ADMIN_CAN_NOT_UPDATE(1002002008, "管理员的账号不允许变更"),
// ========== 资源模块 1002003000 ==========
// RESOURCE_NAME_DUPLICATE(1002003000, "已经存在该名字的资源"),
// RESOURCE_PARENT_NOT_EXISTS(1002003001, "父资源不存在"),
// RESOURCE_PARENT_ERROR(1002003002, "不能设置自己为父资源"),
// RESOURCE_NOT_EXISTS(1002003003, "资源不存在"),
// RESOURCE_EXISTS_CHILDREN(1002003004, "存在子资源,无法删除"),
// RESOURCE_PARENT_NOT_MENU(1002003005, "父资源的类型必须是菜单"),
RESOURCE_NAME_DUPLICATE(1002003000, "已经存在该名字的资源"),
RESOURCE_PARENT_NOT_EXISTS(1002003001, "父资源不存在"),
RESOURCE_PARENT_ERROR(1002003002, "不能设置自己为父资源"),
RESOURCE_NOT_EXISTS(1002003003, "资源不存在"),
RESOURCE_EXISTS_CHILDREN(1002003004, "存在子资源,无法删除"),
RESOURCE_PARENT_NOT_MENU(1002003005, "父资源的类型必须是菜单"),
// ========== 角色模块 1002004000 ==========
// ROLE_NOT_EXISTS(1002004000, "角色不存在"),

View File

@@ -12,24 +12,24 @@ public enum ResourceTypeEnum implements IntArrayValuable {
MENU(1, "菜单"),
BUTTON(2, "按钮");
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ResourceTypeEnum::getValue).toArray();
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ResourceTypeEnum::getType).toArray();
/**
* 资源类型
*/
private final Integer value;
private final Integer type;
/**
* 资源类型名
*/
private final String name;
ResourceTypeEnum(Integer value, String name) {
this.value = value;
ResourceTypeEnum(Integer type, String name) {
this.type = type;
this.name = name;
}
public Integer getValue() {
return value;
public Integer getType() {
return type;
}
public String getName() {