From 62d8988cf8209631935f0ca0dc656400ede27cf9 Mon Sep 17 00:00:00 2001 From: "Link.Zhao" Date: Wed, 17 Aug 2022 17:30:28 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-75093=20=E8=BF=90=E8=90=A5=E4=BA=A7?= =?UTF-8?q?=E5=93=81=E5=8C=96=E4=BA=8C=E6=9C=9F=20pr=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TemplateResourceSearchWorkerManager.java | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/TemplateResourceSearchWorkerManager.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/TemplateResourceSearchWorkerManager.java index 998b0a16c5..03fbe39bb1 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/TemplateResourceSearchWorkerManager.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/TemplateResourceSearchWorkerManager.java @@ -59,24 +59,29 @@ public class TemplateResourceSearchWorkerManager implements SearchManager { try { List list = get(); hasSearchResult = !list.isEmpty(); - if (networkError && !hasSearchResult) { - alphaFineFrame.showResult(AlphaFineConstants.NETWORK_ERROR); - return; - } - - if (alphaFineFrame.getSelectedType() == cellType) { - if (!hasSearchResult) { - alphaFineFrame.showResult(CellType.NO_RESULT.getFlagStr4None()); - return; - } - TemplateShopPane.getInstance().refreshPagePane(list); - AlphaFineHelper.getAlphaFineDialog().showResult(cellType.getFlagStr4None()); - } + showResult(list); } catch (Exception e) { FineLoggerFactory.getLogger().error(e.getMessage(), e); } } } + + void showResult(List list) { + if (networkError && !hasSearchResult) { + alphaFineFrame.showResult(AlphaFineConstants.NETWORK_ERROR); + return; + } + + if (alphaFineFrame.getSelectedType() == cellType) { + if (!hasSearchResult) { + alphaFineFrame.showResult(CellType.NO_RESULT.getFlagStr4None()); + } else { + TemplateShopPane.getInstance().refreshPagePane(list); + AlphaFineHelper.getAlphaFineDialog().showResult(cellType.getFlagStr4None()); + } + } + } + }; this.searchWorker.execute(); }