feat:数据集数据预览增加自定义行数;视图增加tip提示

This commit is contained in:
junjie
2021-04-02 11:36:01 +08:00
parent c4cea61e5e
commit 959a044ef6
6 changed files with 52 additions and 8 deletions

View File

@@ -15,4 +15,5 @@ import java.util.List;
public class DataSetTableRequest extends DatasetTable {
private String sort;
private List<String> tableNames;
private String row;
}

View File

@@ -155,10 +155,10 @@ public class DataSetTableService {
DatasetTable datasetTable = datasetTableMapper.selectByPrimaryKey(dataSetTableRequest.getId());
if (StringUtils.equalsIgnoreCase(datasetTable.getType(), "db")) {
String table = dataTableInfoDTO.getTable();
datasourceRequest.setQuery(createQuerySQL(ds.getType(), table, fieldArray) + " LIMIT 0,10");// todo limit
datasourceRequest.setQuery(createQuerySQL(ds.getType(), table, fieldArray) + " LIMIT 0," + dataSetTableRequest.getRow());
} else if (StringUtils.equalsIgnoreCase(datasetTable.getType(), "sql")) {
String sql = dataTableInfoDTO.getSql();
datasourceRequest.setQuery(createQuerySQL(ds.getType(), " (" + sql + ") AS tmp ", fieldArray));// todo 因为编辑可能取消某些字段展示这里sql看看怎么处理
datasourceRequest.setQuery(createQuerySQL(ds.getType(), " (" + sql + ") AS tmp ", fieldArray) + " LIMIT 0," + dataSetTableRequest.getRow());
}
List<String[]> data = new ArrayList<>();