refactor: 代码调整

This commit is contained in:
junjie
2021-02-25 09:59:18 +08:00
parent 2478683b61
commit dcc522dc05
6 changed files with 17 additions and 14 deletions

View File

@@ -121,7 +121,7 @@ public class DataSetTableService {
String[] fieldArray = fields.stream().map(DatasetTableField::getOriginName).toArray(String[]::new);
// datasourceRequest.setQuery("SELECT " + StringUtils.join(fieldArray, ",") + " FROM " + table + " LIMIT 0,10;");
datasourceRequest.setQuery(createQuerySQL(ds.getType(), table, fieldArray) + " LIMIT 0,10;");
datasourceRequest.setQuery(createQuerySQL(ds.getType(), table, fieldArray) + " LIMIT 0,10");
List<String[]> data = new ArrayList<>();
try {

View File

@@ -22,8 +22,8 @@ CREATE TABLE IF NOT EXISTS `dataset_table_field`
`checked` tinyint(1) NOT NULL DEFAULT true COMMENT '是否选中',
`column_index` int(10) NOT NULL COMMENT '列位置',
`last_sync_time` bigint(13) COMMENT '同步时间',
PRIMARY KEY (`id`)
PRIMARY KEY (`id`),
KEY `IDX_TABLE_ID` (`table_id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4;
ALTER TABLE `dataset_table_field` ADD INDEX IDX_TABLE_ID (`table_id`);