|
@@ -5,6 +5,7 @@ import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.Optional;
|
|
|
import java.util.Set;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -226,6 +227,20 @@ public class RolePrivilegeController extends ControllerSupport {
|
|
|
return rootNode;
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "查询顶级机构的权限ID集合")
|
|
|
+ @GetMapping("getRootOrgPrivilegeIdList/{rootOrgId}/{privilegeGroupId}")
|
|
|
+ public List<Long> getRootOrgPrivilegeIdList(@PathVariable Long rootOrgId,
|
|
|
+ @PathVariable Long privilegeGroupId) {
|
|
|
+
|
|
|
+ List<RootOrgPrivilegeRelationEntity> list = rootOrgPrivilegeRelationRepo
|
|
|
+ .findAllByRootOrgIdAndGroupId(rootOrgId, privilegeGroupId);
|
|
|
+
|
|
|
+ List<Long> pList = list.stream().map(RootOrgPrivilegeRelationEntity::getPrivilegeId)
|
|
|
+ .collect(Collectors.toList());
|
|
|
+
|
|
|
+ return pList;
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation(value = "查询角色的权限ID集合")
|
|
|
@GetMapping("getPrivilegeIdList/{rootOrgId}/{roleId}")
|
|
|
public Set<Long> getPrivilegeIdList(@PathVariable Long rootOrgId, @PathVariable Long roleId) {
|