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); tableName = dataSetTableService.getCustomSQLDatasource(dataTableInfoDTO, list, ds);
break; break;
case UNION: case UNION:
Datasource datasource = new Datasource(); Datasource datasource = ((PluginViewSetImpl) pluginViewSet).getDs();
datasource.setType(pluginViewSet.getDsType());
Map<String, Object> sqlMap = dataSetTableService.getUnionSQLDatasource(dataTableInfoDTO, datasource); Map<String, Object> sqlMap = dataSetTableService.getUnionSQLDatasource(dataTableInfoDTO, datasource);
tableName = (String) sqlMap.get("sql"); tableName = "(" + ((String) sqlMap.get("sql")) + ")";
break; break;
default: default:
tableName = dataTableInfoDTO.getTable(); tableName = dataTableInfoDTO.getTable();