From c88bac574499a4aaae37df06329033823b5d1fa2 Mon Sep 17 00:00:00 2001 From: Lanlan Date: Thu, 2 Jul 2020 11:53:12 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-29573=20=E3=80=90=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E3=80=91=E6=8F=92=E4=BB=B6=E7=AE=A1=E7=90=86=E7=B1=BB?= =?UTF-8?q?=E5=88=AB=E3=80=81=E5=9C=BA=E6=99=AF=E9=83=A8=E5=88=86=E4=BB=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=B8=AD=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../exe/GetPluginCategoriesExecutor.java | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/extra/exe/GetPluginCategoriesExecutor.java b/designer-base/src/main/java/com/fr/design/extra/exe/GetPluginCategoriesExecutor.java index 1d6e8c483..1f8db99a0 100644 --- a/designer-base/src/main/java/com/fr/design/extra/exe/GetPluginCategoriesExecutor.java +++ b/designer-base/src/main/java/com/fr/design/extra/exe/GetPluginCategoriesExecutor.java @@ -1,10 +1,13 @@ package com.fr.design.extra.exe; +import com.fr.design.DesignerEnvManager; import com.fr.design.extra.PluginConstants; import com.fr.design.extra.Process; import com.fr.general.CloudCenter; -import com.fr.general.http.HttpClient; +import com.fr.general.http.HttpToolbox; +import com.fr.log.FineLoggerFactory; import com.fr.stable.StringUtils; +import java.util.Locale; /** * Created by vito on 16/5/16. @@ -28,14 +31,17 @@ public class GetPluginCategoriesExecutor implements Executor { @Override public void run(Process process) { - String url = CloudCenter.getInstance().acquireUrlByKind("shop.plugin.category"); + Locale locale = DesignerEnvManager.getEnvManager().getLanguage(); + String url = CloudCenter.getInstance().acquireUrlByKind("shop.plugin.category") + "&locale=" + locale.toString(); if (StringUtils.isNotEmpty(url)) { - HttpClient httpClient = new HttpClient(url); - result = httpClient.getResponseText(); - } else { - result = PluginConstants.CONNECTION_404; + try { + result = HttpToolbox.get(url); + return; + } catch (Exception e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); + } } - + result = PluginConstants.CONNECTION_404; } } };