Browse Source

Pull request #15183: REPORT-138572 【fr-fbp冒烟】【数据源】模板左下角点击加号新建数据集,名称不会和已有的服务器数据集校验 & REPORT-138544 【fr-fbp冒烟】服务器数据集没有数据连接的权限,异常报错不符合预期

Merge in DESIGN/design from ~DESTINY.LIN/design:fbp/master to fbp/master

* commit 'cd2a7064716c37043df4773919686472f7d5df99':
  REPORT-138544 【fr-fbp冒烟】服务器数据集没有数据连接的权限,异常报错不符合预期
  REPORT-138572 【fr-fbp冒烟】【数据源】模板左下角点击加号新建数据集,名称不会和已有的服务器数据集校验
fbp/master
Destiny.Lin-林锦龙 1 month ago
parent
commit
f99e7823ce
  1. 4
      designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java
  2. 3
      designer-base/src/main/java/com/fr/design/data/datapane/preview/TableDataBeanHelper.java

4
designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java

@ -1,7 +1,6 @@
package com.fr.design.data;
import com.fanruan.ComponentUtils;
import com.fanruan.config.impl.data.TableDataConfigProviderFactory;
import com.fr.base.StoreProcedureParameter;
import com.fr.base.TableData;
import com.fr.concurrent.NamedThreadFactory;
@ -20,6 +19,7 @@ import com.fr.data.impl.storeproc.StoreProcedureHelper;
import com.fr.data.operator.DataOperator;
import com.fr.design.DesignModelAdapter;
import com.fr.design.data.datapane.preview.PreviewTablePane;
import com.fr.design.data.datapane.preview.TableDataBeanHelper;
import com.fr.design.data.tabledata.wrapper.MultiResultTableDataNameWrapper;
import com.fr.design.data.tabledata.wrapper.MultiResultTableDataWrapper;
import com.fr.design.data.tabledata.wrapper.ServerTableDataWrapper;
@ -316,7 +316,7 @@ public abstract class DesignTableDataManager {
names.add(entry.getKey());
}
//服务器数据集
Map<String, TableData> tableDatas = TableDataConfigProviderFactory.getInstance().getTableDatas();
Map<String, TableData> tableDatas = TableDataBeanHelper.getServerTableDatas();
for (Map.Entry<String, TableData> entry : tableDatas.entrySet()) {
names.add(entry.getKey());
}

3
designer-base/src/main/java/com/fr/design/data/datapane/preview/TableDataBeanHelper.java

@ -198,9 +198,8 @@ public class TableDataBeanHelper {
tableData.setPageQuerySql(DataEncryptionHelper.decrypt(bean.getPageQuery()));
}
Connection connection = connectionMap.get(bean.getDatabase());
if (connection != null) {
tableData.setDatabase(new NameDatabaseConnection(bean.getDatabase()));
} else {
if (connection == null) {
FineLoggerFactory.getLogger().info("not find conn by {}", bean.getDatabase());
}
String sql = SqlUtils.clearSqlComments(DataEncryptionHelper.decrypt(bean.getQuery()));

Loading…
Cancel
Save