public RoleVo getRoleDetail(String id) {
        RoleVo role = BeanExtUtils.convert(roleRepository.findById(id)
                .orElseThrow(NullPointerException::new), RoleVo::new);
        role.setCategoryIds(roleCategoryRepository.findByRoleId(id).stream()
                .map(RoleCategory::getCategoryId).distinct().collect(Collectors.toList()));
        role.setUserIds(roleUserRepository.findByRoleId(id).stream()
                .map(RoleUser::getUserId).distinct().collect(Collectors.toList()));
        return role;
    }
getRoleDetail

@param id id
@return RoleVo
src/main/java/com/tuituidan/openhub/service/RoleService.java