Merge pull request #3262 from dataease/pr@dev@fix_plugin_view_union_ds

fix(视图): 插件视图无法使用关联数据集
This commit is contained in:
xuwei-fit2cloud 2022-09-29 16:04:49 +08:00 committed by GitHub
commit 53d8a6f099
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -124,10 +124,9 @@ public class ViewPluginBaseServiceImpl implements ViewPluginBaseService {
tableName = dataSetTableService.getCustomSQLDatasource(dataTableInfoDTO, list, ds);
break;
case UNION:
Datasource datasource = new Datasource();
datasource.setType(pluginViewSet.getDsType());
Datasource datasource = ((PluginViewSetImpl) pluginViewSet).getDs();
Map<String, Object> sqlMap = dataSetTableService.getUnionSQLDatasource(dataTableInfoDTO, datasource);
tableName = (String) sqlMap.get("sql");
tableName = "(" + ((String) sqlMap.get("sql")) + ")";
break;
default:
tableName = dataTableInfoDTO.getTable();