feat(视图): 部分数据源不支持直连分页,使用前端分页

This commit is contained in:
junjun 2022-11-25 16:50:03 +08:00
parent 81d7bc0cd5
commit a4b2ec8250
2 changed files with 3 additions and 2 deletions

View File

@ -45,5 +45,5 @@ public class ChartViewDTO extends ChartViewWithBLOBs {
private long totalPage;
private long totalItems;
private int datasetMode;
private String datasetType;
private String datasourceType;
}

View File

@ -302,7 +302,8 @@ public class ChartViewService {
DatasetTable datasetTable = dataSetTableService.get(view.getTableId());
if (ObjectUtils.isNotEmpty(datasetTable)) {
view.setDatasetMode(datasetTable.getMode());
view.setDatasetType(datasetTable.getType());
Datasource datasource = datasourceService.get(datasetTable.getDataSourceId());
view.setDatasourceType(datasource != null ? datasource.getType() : null);
}
// 如果是从仪表板获取视图数据则仪表板的查询模式查询结果的数量覆盖视图对应的属性
if (CommonConstants.VIEW_RESULT_MODE.CUSTOM.equals(request.getResultMode())) {