@Override
    public DataResult<Boolean> checkTableVector(TableVectorParam param) {
        LambdaQueryWrapper<TableVectorMappingDO> queryWrapper = new LambdaQueryWrapper();
        queryWrapper.eq(TableVectorMappingDO::getApiKey, param.getApiKey());
        queryWrapper.eq(TableVectorMappingDO::getDataSourceId, param.getDataSourceId());
        queryWrapper.eq(TableVectorMappingDO::getDatabase, param.getDatabase());
        queryWrapper.eq(TableVectorMappingDO::getSchema, param.getSchema());
        TableVectorMappingDO mappingDO = getTableVectorMapper().selectOne(queryWrapper);
        if (Objects.nonNull(mappingDO) && TableVectorEnum.SAVED.getCode().equals(mappingDO.getStatus())) {
            return DataResult.of(true);
        }
        return DataResult.of(false);
    }
@author moji
@version DataSourceCoreServiceImpl.java, v 0.1 September 23, 2022 15:51 moji Exp $
@date 2022/09/23
chat2db-server/chat2db-server-domain/chat2db-server-domain-core/src/main/java/ai/chat2db/server/domain/core/impl/TableServiceImpl.java