Browse Source

REPORT-81241【运营产品化二期】插件中心断网后的重新加载无反应

修改pr
feature/x
Link.Zhao 2 years ago
parent
commit
da5b635450
  1. 25
      designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineCloudConstants.java
  2. 11
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/helper/FineMarketClientHelper.java

25
designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineCloudConstants.java

@ -12,14 +12,14 @@ import com.fr.general.CloudCenter;
public class AlphaFineCloudConstants {
/**
* get PluginSearchUrl
* 获取插件搜索api
*/
public static String getPluginSearchUrl() {
return CloudCenter.getInstance().acquireUrlByKind("plugin.searchAPI");
};
/**
* get SearchAllPluginUrl
* 帆软市场里全部插件api
*/
public static String getSearchAllPluginUrl() {
return CloudCenter.getInstance().acquireUrlByKind("plugin.all.searchAPI");
@ -47,21 +47,21 @@ public class AlphaFineCloudConstants {
}
/**
* get DocumentSearchUrl
* 帮助文档搜索api
*/
public static String getDocumentSearchUrl() {
return CloudCenter.getInstance().acquireUrlByKind("af.doc_search");
}
/**
* get DocumentInformationUrl
* 帮助文档信息api
*/
public static String getDocumentInformationUrl() {
return CloudCenter.getInstance().acquireUrlByKind("af.doc_info");
}
/**
* get PluginImageUrl
* 插件图片api
*/
public static String getPluginImageUrl() {
return CloudCenter.getInstance().acquireUrlByKind("af.plugin_image");
@ -96,14 +96,14 @@ public class AlphaFineCloudConstants {
}
/**
* get AlphaHotSearch
* 获取热门问题
*/
public static String getAlphaHotSearch() {
return CloudCenter.getInstance().acquireUrlByKind("af.hot_search");
}
/**
* get AlphaGoToForum
* 跳转论坛url
*/
public static String getAlphaGoToForum() {
return CloudCenter.getInstance().acquireUrlByKind("af.go_fourm");
@ -124,23 +124,20 @@ public class AlphaFineCloudConstants {
}
/**
* get AlphaCid
* cid系统的产品动态api
*/
public static String getAlphaCid() {
return CloudCenter.getInstance().acquireUrlByKind("af.cid.new");
}
/**
* get AlphaCidUserGroupInfo
* cid系统的 用户组信息api
*/
public static String getAlphaCidUserGroupInfo() {
return CloudCenter.getInstance().acquireUrlByKind("af.cid.user.group.info");
}
/**
* get DefaultRecommend
*/
public static String getDefaultRecommend() {
private static String getDefaultRecommend() {
String quickStartUrl = CloudCenter.getInstance().acquireUrlByKind("af.help.quick.start");
String reportLearningPath = CloudCenter.getInstance().acquireUrlByKind("af.help.report.learning.path");
String parameterLearningPath = CloudCenter.getInstance().acquireUrlByKind("af.help.param.learning.path");
@ -156,7 +153,7 @@ public class AlphaFineCloudConstants {
}
/**
* get AlphaHelpRecommend
* 获取默认推荐帮助文档url
*/
public static String getAlphaHelpRecommend() {
return CloudCenter.getInstance().acquireUrlByKind("af.recommend", getDefaultRecommend());

11
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/helper/FineMarketClientHelper.java

@ -48,12 +48,13 @@ 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=11.0";
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";
@ -269,8 +270,10 @@ public class FineMarketClientHelper {
}
public @Nullable JSONArray getTemplateInfoByName(String name) throws IOException {
String url = FINE_MARKET_TEMPLATE_INFO + NAME_SEARCH + name + VERSION;
String jsonString = HttpToolbox.get(url);
Map<String, String> params = new HashMap();
params.put(NAME_SEARCH, name);
params.put(VERSION, CURRENT_VERSION);
String jsonString = HttpToolbox.get(FINE_MARKET_TEMPLATE_INFO, params);
JSONObject jsonObject = new JSONObject(jsonString);
String responseState = (String) jsonObject.get(RESPONSE_STATE);
if (RESPONSE_SUCCESS.equals(responseState)) {

Loading…
Cancel
Save