@Override
    public CommonPager<DataPermissionPageVO> listSelectorsByPage(final SelectorQuery selectorQuery, final String userId) {
        int totalCount = selectorMapper.countByQuery(selectorQuery);
        
        List<DataPermissionPageVO> selectorList = Collections.emptyList();
        if (totalCount > 0) {
            Supplier<Stream<SelectorDO>> selectorDOStreamSupplier = () -> selectorMapper.selectByQuery(selectorQuery).stream();
            List<String> selectorIds = selectorDOStreamSupplier.get().map(SelectorDO::getId).collect(Collectors.toList());

            Set<String> hasDataPermissionSelectorIds = new HashSet<>();
            if (!selectorIds.isEmpty()) {
                hasDataPermissionSelectorIds.addAll(dataPermissionMapper.selectDataIds(selectorIds,
                        userId, AdminDataPermissionTypeEnum.SELECTOR.ordinal()));
            }

            selectorList = selectorDOStreamSupplier.get().map(selectorDO -> {
                boolean isChecked = hasDataPermissionSelectorIds.contains(selectorDO.getId());
                return DataPermissionPageVO.buildPageVOBySelector(selectorDO, isChecked);
            }).collect(Collectors.toList());
        }
        
        List<DataPermissionPageVO> finalSelectorList = selectorList;
        return PageResultUtils.result(selectorQuery.getPageParameter(), () -> totalCount, () -> finalSelectorList);
    }
list of selectors.

@param selectorQuery {@linkplain SelectorQuery}
@param userId        user id
@return {@linkplain CommonPager}
shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/DataPermissionServiceImpl.java