@Override
    @Transactional(rollbackFor = Exception.class)
    public int deleteSelector(final DataPermissionDTO dataPermissionDTO) {
        List<String> allRuleIds = ruleMapper.findBySelectorId(dataPermissionDTO.getDataId())
                .stream()
                .filter(Objects::nonNull)
                .map(RuleDO::getId)
                .collect(Collectors.toList());
        
        int count = 0;
        if (CollectionUtils.isNotEmpty(allRuleIds)) {
            count = dataPermissionMapper.deleteByDataIdsAndUserId(allRuleIds, dataPermissionDTO.getUserId(),
                    AdminDataPermissionTypeEnum.RULE.ordinal());
        }
        
        count += dataPermissionMapper.deleteByUniqueKey(dataPermissionDTO.getDataId(), dataPermissionDTO.getUserId(),
                AdminDataPermissionTypeEnum.SELECTOR.ordinal());
        
        return count;
    }
deleteSelector data permission.

@param dataPermissionDTO {@linkplain DataPermissionDTO}
@return int  effect rows
shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/DataPermissionServiceImpl.java