Commit b17ef6cf by qiuchaofei

查找表的字段的接口

parent 760f0cce
......@@ -2,6 +2,7 @@ package com.keymobile.metadata.metadataRelation.controller;
import com.keymobile.metadata.metadataRelation.pojo.returnBean.ReturnNode;
import com.keymobile.metadata.metadataRelation.service.DataRelationAnalyService;
import com.keymobile.metadata.metadataRelation.service.ITableService;
import io.swagger.annotations.Api;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -10,6 +11,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.Map;
@RestController
......@@ -21,6 +23,9 @@ public class DataRelationAnalyController {
@Autowired
private DataRelationAnalyService dataRelationAnalyService;
@Autowired
private ITableService tableService;
@RequestMapping(path = "/getIsolatedNode", method = RequestMethod.GET)
public Map<String, ReturnNode> getIsolatedNode(String parentId) {
logger.info("查找指定schema下面的孤立点。");
......@@ -28,4 +33,10 @@ public class DataRelationAnalyController {
return dataRelationAnalyService.findTableWithoutRelations(parentId);
}
@RequestMapping(path = "/findColumnByTableIdAndName", method = RequestMethod.GET)
public Map<String, List<ReturnNode>> findColumnByTableIdAndName(String tableId, String columnName) {
logger.info("查找指定schema下面的孤立点。表id:"+tableId +" ,给定名字:"+ columnName);
return tableService.autoMatchBySchemaIdAndInputWord(tableId,columnName);
}
}
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