From afdbf158bf189c80e8ac49e107a6810b3535a614 Mon Sep 17 00:00:00 2001 From: lemon Date: Fri, 6 Sep 2024 18:51:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E8=A7=84=E8=8C=83=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wrapper/ServerTableDataWrapper.java | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/ServerTableDataWrapper.java b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/ServerTableDataWrapper.java index 0d7b1297ea..4a07d9ab91 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/ServerTableDataWrapper.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/ServerTableDataWrapper.java @@ -27,13 +27,10 @@ public final class ServerTableDataWrapper extends AbstractTableDataWrapper { @Override public Icon getIcon() { if (tabledata instanceof DBTableData) { - if (StringUtils.isBlank(((DBTableData) tabledata).getQuery())) { - return new LazyIcon("server_database_warning"); - } - else { - return new LazyIcon("server_database"); - } - } else if (tabledata instanceof ClassTableData) { + return getDBTableDataIcon(); + } + + if (tabledata instanceof ClassTableData) { return new LazyIcon("class_table_data"); } else if (tabledata instanceof EmbeddedTableData) { return new LazyIcon("data_table"); @@ -49,6 +46,15 @@ public final class ServerTableDataWrapper extends AbstractTableDataWrapper { return new LazyIcon("server_database"); } + private Icon getDBTableDataIcon() { + if (StringUtils.isBlank(((DBTableData) tabledata).getQuery())) { + return new LazyIcon("server_database_warning"); + } + else { + return new LazyIcon("server_database"); + } + } + /** * 是否异常 * @return