Browse Source

Pull request #10208: REPORT-81483【运营产品化二期】11.0设计器需要支持搜索10.0&11.0的模板

Merge in DESIGN/design from ~LINK.ZHAO/design:feature/x to feature/x

* commit '5ee07f700be255d20817beccd5b20349d3b05f8a':
  REPORT-81483【运营产品化二期】11.0设计器需要支持搜索10.0&11.0的模板 1、修改了请求参数 2、修改了参数编码方式 3、修改了重载事件,添加重载动画
feature/x
Link.Zhao-赵展 2 years ago
parent
commit
52588c7d19
  1. 2
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java
  2. 13
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/helper/FineMarketClientHelper.java

2
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)) { if (StringUtils.isEmpty(text)) {
return; return;
} }
searchLoadingPane = new SearchLoadingPane(); initSearchLoadingPane();
SearchTextBean searchTextBean = new SearchTextBean(text, segmentationResult); SearchTextBean searchTextBean = new SearchTextBean(text, segmentationResult);
this.productNewsSearchWorkerManager.doSearch(searchTextBean); this.productNewsSearchWorkerManager.doSearch(searchTextBean);
this.documentWorkerManager.doSearch(searchTextBean); this.documentWorkerManager.doSearch(searchTextBean);

13
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(); 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_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 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 FILE_DOWNLOAD = "file/download/";
public static final String PACKAGE_DOWNLOAD = "package/download/"; public static final String PACKAGE_DOWNLOAD = "package/download/";
public static final String TEMPLATES_PARENT_PACKAGE = "parent/"; public static final String TEMPLATES_PARENT_PACKAGE = "parent/";
public static final String TEMPLATES_TAGS = "filter"; 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_STATE = "state";
public static final String RESPONSE_SUCCESS = "ok"; public static final String RESPONSE_SUCCESS = "ok";
@ -271,11 +269,12 @@ public class FineMarketClientHelper {
} }
} }
/**
* 通过名字搜索模板信息
*/
public @Nullable JSONArray getTemplateInfoByName(String name) throws IOException { public @Nullable JSONArray getTemplateInfoByName(String name) throws IOException {
Map<String, String> params = new HashMap(); String url = FINE_MARKET_TEMPLATE_INFO + NAME_SEARCH + ClientHelper.urlEncode(name, EncodeConstants.ENCODING_UTF_8);
params.put(NAME_SEARCH, name); String jsonString = HttpToolbox.get(url);
params.put(VERSION, CURRENT_VERSION);
String jsonString = HttpToolbox.get(FINE_MARKET_TEMPLATE_INFO, params);
JSONObject jsonObject = new JSONObject(jsonString); JSONObject jsonObject = new JSONObject(jsonString);
String responseState = (String) jsonObject.get(RESPONSE_STATE); String responseState = (String) jsonObject.get(RESPONSE_STATE);
if (RESPONSE_SUCCESS.equals(responseState)) { if (RESPONSE_SUCCESS.equals(responseState)) {

Loading…
Cancel
Save