From 6ac864e17073f5e87acaf405b880ec431f4eaddc Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Thu, 29 Sep 2022 15:59:07 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=A7=86=E5=9B=BE):=20=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E8=A7=86=E5=9B=BE=E6=97=A0=E6=B3=95=E4=BD=BF=E7=94=A8=E5=85=B3?= =?UTF-8?q?=E8=81=94=E6=95=B0=E6=8D=AE=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/dataease/service/chart/ViewPluginBaseServiceImpl.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/io/dataease/service/chart/ViewPluginBaseServiceImpl.java b/backend/src/main/java/io/dataease/service/chart/ViewPluginBaseServiceImpl.java index a1160b5f42..5e992c7ee6 100644 --- a/backend/src/main/java/io/dataease/service/chart/ViewPluginBaseServiceImpl.java +++ b/backend/src/main/java/io/dataease/service/chart/ViewPluginBaseServiceImpl.java @@ -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 sqlMap = dataSetTableService.getUnionSQLDatasource(dataTableInfoDTO, datasource); - tableName = (String) sqlMap.get("sql"); + tableName = "(" + ((String) sqlMap.get("sql")) + ")"; break; default: tableName = dataTableInfoDTO.getTable();