|
@@ -6,6 +6,7 @@ import org.dbsyncer.connector.config.Field;
|
|
|
import org.dbsyncer.connector.config.MetaInfo;
|
|
|
import org.dbsyncer.connector.config.Table;
|
|
|
import org.dbsyncer.manager.Manager;
|
|
|
+import org.dbsyncer.parser.model.FieldMapping;
|
|
|
import org.dbsyncer.parser.model.Mapping;
|
|
|
import org.dbsyncer.parser.model.TableGroup;
|
|
|
import org.slf4j.Logger;
|
|
@@ -14,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.util.Assert;
|
|
|
|
|
|
+import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
@@ -65,6 +67,11 @@ public class TableGroupServiceImpl implements TableGroupService {
|
|
|
public TableGroup getTableGroup(String id) {
|
|
|
TableGroup tableGroup = manager.getTableGroup(id);
|
|
|
Assert.notNull(tableGroup, "TableGroup can not be null");
|
|
|
+ // TODO 模拟数据
|
|
|
+ FieldMapping m = new FieldMapping();
|
|
|
+ m.setSource(new Field("ID1", "VARCHAR", 12));
|
|
|
+ m.setTarget(new Field("ID2", "VARCHAR", 12));
|
|
|
+ tableGroup.setFieldMapping(Arrays.asList(m));
|
|
|
return tableGroup;
|
|
|
}
|
|
|
|