添加字段和表

master
Cui YongXing 2024-09-01 15:15:23 +08:00
parent e15a957308
commit ef14392a40
3 changed files with 10 additions and 3 deletions

View File

@ -10,5 +10,8 @@ public interface TaskInputMapper extends BaseMapper<TaskInput> {
TaskInput selectByNodeId(String oneNodeId);
TaskInput selectByTaskId(Long taskId);
Long selectByBasicId(Long taskId);
}

View File

@ -91,12 +91,11 @@ public class TaskInputServiceImpl extends ServiceImpl<TaskInputMapper, TaskInput
String tableAsName = taskInput.getTableAsName();
joint=" "+tableName+" "+tableAsName;
}
TaskInput taskInput = taskInputMapper.selectByTaskId(taskId);
Long databaseId = taskInput.getDatabaseId();
Long basicId = taskInputMapper.selectByBasicId(taskId);
fieName = fieName.substring(1);
String sql="select "+fieName + " form "+joint;
System.out.println("select "+fieName + " from "+joint);
Result<List<List<DataValue>>> tableValue = datasourceFeign.findTableValue(databaseId, sql);
Result<List<List<DataValue>>> tableValue = datasourceFeign.findTableValue(basicId, sql);
System.out.println(tableValue);
return null;
}

View File

@ -10,6 +10,11 @@
where node_id =${nodeId}
</select>
<select id="selectByTaskId" resultType="com.muyu.common.domian.TaskInput">
SELECT DISTINCT database_id
FROM etl_task_input e left join table_info t on e.database_id=t.id
where task_id =${taskId}
</select>
<select id="selectByBasicId" resultType="java.lang.Long">
SELECT DISTINCT basic_id
FROM etl_task_input e left join table_info t on e.database_id=t.id
where task_id =${taskId}