Commit 8ba11d2b by qiuchaofei

1修改搜索接口的参数名称

parent 96980932
...@@ -5,6 +5,7 @@ import com.keymobile.metadata.metadataRelation.pojo.returnBean.ReturnNode; ...@@ -5,6 +5,7 @@ import com.keymobile.metadata.metadataRelation.pojo.returnBean.ReturnNode;
import com.keymobile.metadata.metadataRelation.pojo.returnBean.ReturnReslult; import com.keymobile.metadata.metadataRelation.pojo.returnBean.ReturnReslult;
import com.keymobile.metadata.metadataRelation.remote.DataAssertRemoteService; import com.keymobile.metadata.metadataRelation.remote.DataAssertRemoteService;
import com.keymobile.metadata.metadataRelation.remote.DataStandardRemoteService; import com.keymobile.metadata.metadataRelation.remote.DataStandardRemoteService;
import com.keymobile.metadata.metadataRelation.remote.TagRemoteService;
import com.keymobile.metadata.metadataRelation.service.IMetadataService; import com.keymobile.metadata.metadataRelation.service.IMetadataService;
import com.keymobile.metadata.metadataRelation.service.ISchemaService; import com.keymobile.metadata.metadataRelation.service.ISchemaService;
import com.keymobile.metadata.metadataRelation.service.ISystemService; import com.keymobile.metadata.metadataRelation.service.ISystemService;
...@@ -22,10 +23,7 @@ import org.springframework.web.bind.annotation.RequestMethod; ...@@ -22,10 +23,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.sql.SQLOutput; import java.sql.SQLOutput;
import java.util.HashMap; import java.util.*;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@RestController @RestController
@Api(value = "关系图谱的接口", tags = "relational graph controller") @Api(value = "关系图谱的接口", tags = "relational graph controller")
...@@ -46,6 +44,16 @@ public class RelationalGraphController { ...@@ -46,6 +44,16 @@ public class RelationalGraphController {
@Autowired @Autowired
private DataStandardRemoteService dataStandardRemoteService; private DataStandardRemoteService dataStandardRemoteService;
@Autowired
private TagRemoteService tagRemoteService;
//测试标签的接口的接口
@ApiOperation(tags = "", value = "测试标准的接口")
@RequestMapping(path = "/testTagService", method = RequestMethod.GET)
public void testTagService(String metadataId){
}
//测试标准的接口 //测试标准的接口
@ApiOperation(tags = "", value = "测试标准的接口") @ApiOperation(tags = "", value = "测试标准的接口")
@RequestMapping(path = "/dataAssertRemoteService", method = RequestMethod.GET) @RequestMapping(path = "/dataAssertRemoteService", method = RequestMethod.GET)
...@@ -110,14 +118,23 @@ public class RelationalGraphController { ...@@ -110,14 +118,23 @@ public class RelationalGraphController {
@ApiOperation(tags = "", value = "传入表的id,返回表的上下游一层关系。") @ApiOperation(tags = "", value = "传入表的id,返回表的上下游一层关系。")
@RequestMapping(path = "/getRelationTablesTableId", method = RequestMethod.GET) @RequestMapping(path = "/getRelationTablesTableId", method = RequestMethod.GET)
public Map<String,List<ReturnNode>> getRelationTablesTableId(String tableId){ public Map<String,List<ReturnNode>> getRelationTablesTableId(String tableId){
return tableService.getSourceAndTargetTableByTableId (tableId); long start = System.currentTimeMillis();
Map<String, List<ReturnNode>> relationTables = tableService.getSourceAndTargetTableByTableId (tableId);
long end = System.currentTimeMillis();
logger.info("获取关联的表,用时:"+(end-start));
return relationTables;
} }
//表的分析,关系分析--表与模型,表与质量,表与标准,表与作业的关系 //表的分析,关系分析--表与模型,表与质量,表与标准,表与作业的关系
@ApiOperation(tags = "", value = "传入表的id,返回与表相关的模型,标准,质量,资产,作业等对象") @ApiOperation(tags = "", value = "传入表的id,返回与表相关的模型,标准,质量,资产,作业等对象")
@RequestMapping(path = "/getRelationObjectByTableId", method = RequestMethod.GET) @RequestMapping(path = "/getRelationObjectByTableId", method = RequestMethod.GET)
public Map<String,List<ReturnNode>> getRelationObjectByTableId(String tableId){ public Map<String,List<ReturnNode>> getRelationObjectByTableId(String tableId){
return tableService.getRelationObjectByTableId (tableId); long start = System.currentTimeMillis();
Map<String, List<ReturnNode>> relationObjects = tableService.getRelationObjectByTableId (tableId);
long end = System.currentTimeMillis();
logger.info("获取关联的其他对象, 用时:"+(end-start));
return relationObjects;
} }
//搜索接口,多个搜索结果,则先弹出列表(对象的全路径),再进行选择哪个对象 //搜索接口,多个搜索结果,则先弹出列表(对象的全路径),再进行选择哪个对象
...@@ -141,13 +158,11 @@ public class RelationalGraphController { ...@@ -141,13 +158,11 @@ public class RelationalGraphController {
} }
//单个schema的数据,包括表,视图,函数,过程等,列表形势 //单个schema的数据,包括表,视图,函数,过程等,列表形势
@ApiOperation(tags = "", value = "传入schemaid,返回表,视图,函数,存储过程") @ApiOperation(tags = "", value = "传入schemaId 关键词,返回表,视图,函数,存储过程")
@RequestMapping(path = "/getTableBySchemaIdAndKeyWord", method = RequestMethod.GET) @RequestMapping(path = "/getTableBySchemaIdAndKeyWord", method = RequestMethod.GET)
public Map<String, List<ReturnNode>> getTableBySchemaIdAndKeyWord(String schemaId,String keyWord){ public Map<String, List<ReturnNode>> getTableBySchemaIdAndKeyWord(String schemaId,String keyword){
//传入一个系统名称/id,返回系统下的所有schema,注意分层 //传入一个系统名称/id,返回系统下的所有schema,注意分层
return tableService.autoMatchBySchemaIdAndInputWord(schemaId,keyWord); return tableService.autoMatchBySchemaIdAndInputWord(schemaId,keyword);
} }
//同步数据,从mongo到neo4j,从“环境,系统,schema,表”的结构---完成 //同步数据,从mongo到neo4j,从“环境,系统,schema,表”的结构---完成
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment