diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/TableDataBeanHelper.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/TableDataBeanHelper.java index 5efe1c8908..29750d1294 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/TableDataBeanHelper.java +++ b/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 { + tableData.setDatabase(new NameDatabaseConnection(bean.getDatabase())); + if (connection == null) { FineLoggerFactory.getLogger().info("not find conn by {}", bean.getDatabase()); } String sql = SqlUtils.clearSqlComments(DataEncryptionHelper.decrypt(bean.getQuery()));