From 16c7a6f4ddb6079424848a24d7301b86ab2c0b2e Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 20 May 2020 09:20:43 +0800 Subject: [PATCH] REPORT-31836 && REPORT-31874 --- .../java/com/fr/design/os/impl/PMDialogAction.java | 11 ++++++----- .../search/manager/impl/RecommendSearchManager.java | 8 +++++++- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/os/impl/PMDialogAction.java b/designer-base/src/main/java/com/fr/design/os/impl/PMDialogAction.java index 3f2f09728..7e6eccf74 100644 --- a/designer-base/src/main/java/com/fr/design/os/impl/PMDialogAction.java +++ b/designer-base/src/main/java/com/fr/design/os/impl/PMDialogAction.java @@ -21,10 +21,11 @@ public class PMDialogAction implements OSBasedAction { DesignUtils.visitEnvServerByParameters( PLUGIN_MANAGER_ROUTE,null,null); return; } - if (ServerPreferenceConfig.getInstance().isUseOptimizedUPM() && !OperatingSystem.isLinux()) { - UpmFinder.showUPMDialog(); - } else { - WebViewDlgHelper.createPluginDialog(); - } +// if (ServerPreferenceConfig.getInstance().isUseOptimizedUPM() && !OperatingSystem.isLinux()) { +// UpmFinder.showUPMDialog(); +// } else { +// } + // 直接这里屏蔽掉 防止有设置过 导致配置数据库值为true 即使设置界面屏蔽也没用 + WebViewDlgHelper.createPluginDialog(); } } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecommendSearchManager.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecommendSearchManager.java index 05267220b..ce0d98776 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecommendSearchManager.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecommendSearchManager.java @@ -10,6 +10,7 @@ import com.fr.design.mainframe.alphafine.cell.model.AlphaCellModel; import com.fr.design.mainframe.alphafine.cell.model.MoreModel; import com.fr.design.mainframe.alphafine.model.SearchResult; import com.fr.design.mainframe.alphafine.search.manager.fun.AlphaFineSearchProvider; +import com.fr.general.ComparatorUtils; import com.fr.general.http.HttpToolbox; import com.fr.json.JSONArray; import com.fr.json.JSONObject; @@ -67,7 +68,12 @@ public class RecommendSearchManager implements AlphaFineSearchProvider { if (jsonArray != null && jsonArray.length() > 0) { for (int i = 0; i < jsonArray.length(); i++) { AlphaFineHelper.checkCancel(); - AlphaCellModel alphaCellModel = CellModelHelper.getModelFromJson((JSONObject) jsonArray.get(i)); + JSONObject jo = jsonArray.getJSONObject(i); + JSONObject innerJo = jo.getJSONObject("result"); + if (innerJo != null && ComparatorUtils.equals("failed", innerJo.get("state"))) { + continue; + } + AlphaCellModel alphaCellModel = CellModelHelper.getModelFromJson(jo); if (alphaCellModel != null && !alreadyContain(alphaCellModel) && !this.recommendModelList.contains(alphaCellModel)) { this.recommendModelList.add(alphaCellModel); }