From ac7943ba9acb7bc079e6b331901135d1fff8146a Mon Sep 17 00:00:00 2001 From: "Link.Zhao" Date: Fri, 30 Sep 2022 10:56:56 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-81483=E3=80=90=E8=BF=90=E8=90=A5?= =?UTF-8?q?=E4=BA=A7=E5=93=81=E5=8C=96=E4=BA=8C=E6=9C=9F=E3=80=9111.0?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8=E9=9C=80=E8=A6=81=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=90=9C=E7=B4=A210.0&11.0=E7=9A=84=E6=A8=A1=E6=9D=BF=201?= =?UTF-8?q?=E3=80=81=E4=BF=AE=E6=94=B9=E4=BA=86=E8=AF=B7=E6=B1=82=E5=8F=82?= =?UTF-8?q?=E6=95=B0=202=E3=80=81=E4=BF=AE=E6=94=B9=E4=BA=86=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E7=BC=96=E7=A0=81=E6=96=B9=E5=BC=8F=203=E3=80=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E9=87=8D=E8=BD=BD=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=EF=BC=8C=E6=B7=BB=E5=8A=A0=E9=87=8D=E8=BD=BD=E5=8A=A8=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alphafine/component/AlphaFineFrame.java | 2 +- .../search/helper/FineMarketClientHelper.java | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java index 0269480b60..e74108fee9 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java @@ -915,7 +915,7 @@ public class AlphaFineFrame extends JFrame { if (StringUtils.isEmpty(text)) { return; } - searchLoadingPane = new SearchLoadingPane(); + initSearchLoadingPane(); SearchTextBean searchTextBean = new SearchTextBean(text, segmentationResult); this.productNewsSearchWorkerManager.doSearch(searchTextBean); this.documentWorkerManager.doSearch(searchTextBean); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/helper/FineMarketClientHelper.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/helper/FineMarketClientHelper.java index 42b28cfe8a..817a47cca4 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/helper/FineMarketClientHelper.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/helper/FineMarketClientHelper.java @@ -50,13 +50,11 @@ public class FineMarketClientHelper { private static final String CERTIFICATE_PUBLIC_KEY = FineMarketPublicKeyHolder.getInstance().getDefaultKey(); public static final String FINE_MARKET_TEMPLATE_INFO = CloudCenter.getInstance().acquireUrlByKind("market.template.info"); public static final String FINE_MARKET_TEMPLATE_URL = CloudCenter.getInstance().acquireUrlByKind("market.template.url"); - public static final String VERSION = "version"; - private static final String CURRENT_VERSION = "11.0"; public static final String FILE_DOWNLOAD = "file/download/"; public static final String PACKAGE_DOWNLOAD = "package/download/"; public static final String TEMPLATES_PARENT_PACKAGE = "parent/"; public static final String TEMPLATES_TAGS = "filter"; - public static final String NAME_SEARCH = "searchKeyword"; + public static final String NAME_SEARCH = "?searchKeyword="; public static final String RESPONSE_STATE = "state"; public static final String RESPONSE_SUCCESS = "ok"; @@ -271,11 +269,12 @@ public class FineMarketClientHelper { } } + /** + * 通过名字搜索模板信息 + */ public @Nullable JSONArray getTemplateInfoByName(String name) throws IOException { - Map params = new HashMap(); - params.put(NAME_SEARCH, name); - params.put(VERSION, CURRENT_VERSION); - String jsonString = HttpToolbox.get(FINE_MARKET_TEMPLATE_INFO, params); + String url = FINE_MARKET_TEMPLATE_INFO + NAME_SEARCH + ClientHelper.urlEncode(name, EncodeConstants.ENCODING_UTF_8); + String jsonString = HttpToolbox.get(url); JSONObject jsonObject = new JSONObject(jsonString); String responseState = (String) jsonObject.get(RESPONSE_STATE); if (RESPONSE_SUCCESS.equals(responseState)) {