|
|
@@ -61,7 +61,7 @@ public class RoleRightContent { |
|
|
|
public String getFuncRight(long key) { |
|
|
|
RoleRight right = getRoleRight(key); |
|
|
|
if (right == null) return ""; |
|
|
|
return StringUtil.join(right.getRightFunc(),","); |
|
|
|
return StringUtil.join(right.getRightFunc(), ","); |
|
|
|
} |
|
|
|
|
|
|
|
public String getMenuRight() { |
|
|
@@ -70,8 +70,9 @@ public class RoleRightContent { |
|
|
|
map.values().forEach(roleRight -> { |
|
|
|
if (roleRight.getMenu() == 1) menus.add(roleRight.getId() + ""); |
|
|
|
}); |
|
|
|
return StringUtil.join(menus,","); |
|
|
|
return StringUtil.join(menus, ","); |
|
|
|
} |
|
|
|
|
|
|
|
public Set<Long> getMenuRightIds() { |
|
|
|
Set<Long> ids = new HashSet<>(); |
|
|
|
if (map.size() == 0) return ids; |
|
|
@@ -80,6 +81,7 @@ public class RoleRightContent { |
|
|
|
}); |
|
|
|
return ids; |
|
|
|
} |
|
|
|
|
|
|
|
public String getFieldRight(long key, int type) { |
|
|
|
RoleRight right = getRoleRight(key); |
|
|
|
if (right == null) return ""; |
|
|
@@ -89,17 +91,17 @@ public class RoleRightContent { |
|
|
|
cache.forEach((k, v) -> { |
|
|
|
if (v == type) fields.add(k); |
|
|
|
}); |
|
|
|
return StringUtil.join(fields,","); |
|
|
|
return StringUtil.join(fields, ","); |
|
|
|
} |
|
|
|
|
|
|
|
public Map<String, Object> getDataRight(long key) { |
|
|
|
public Map<String, Map<String, Object>> getDataRight(long key) { |
|
|
|
RoleRight right = getRoleRight(key); |
|
|
|
if (right == null) return new HashMap<>(); |
|
|
|
List<Map<String, Object>> list = right.getRightData(); |
|
|
|
if (list == null || list.size() == 0) return new HashMap<>(); |
|
|
|
Map<String, Object> cache = new HashMap<>(); |
|
|
|
Map<String, Map<String, Object>> cache = new HashMap<>(); |
|
|
|
list.forEach(k -> { |
|
|
|
cache.putAll(k); |
|
|
|
cache.put(k.get("key").toString(), k); |
|
|
|
}); |
|
|
|
return cache; |
|
|
|
} |
|
|
|