fix(视图): 插件视图无法使用关联数据集

This commit is contained in:
fit2cloud-chenyw 2022-09-29 15:59:07 +08:00
parent 4ed736ae2e
commit 6ac864e170

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();