Browse Source

REPORT-75093 运营产品化二期

pr修改
feature/x
Link.Zhao 2 years ago
parent
commit
c150f6bdac
  1. 12
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/preview/TemplateShopPane.java
  2. 7
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/helper/FineMarketClientHelper.java

12
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/preview/TemplateShopPane.java

@ -5,13 +5,13 @@ import com.fr.design.mainframe.alphafine.component.TemplateResourcePageGridPane;
import com.fr.design.mainframe.alphafine.model.TemplateResource; import com.fr.design.mainframe.alphafine.model.TemplateResource;
import com.fr.design.mainframe.alphafine.model.TemplateResourceDetail; import com.fr.design.mainframe.alphafine.model.TemplateResourceDetail;
import com.fr.design.mainframe.alphafine.search.manager.impl.TemplateResourceSearchManager; import com.fr.design.mainframe.alphafine.search.manager.impl.TemplateResourceSearchManager;
import com.fr.log.FineLoggerFactory;
import com.fr.third.apache.logging.log4j.util.Strings; import com.fr.third.apache.logging.log4j.util.Strings;
import javax.swing.JPanel;
import javax.swing.*; import javax.swing.SwingWorker;
import java.awt.CardLayout; import java.awt.CardLayout;
import java.util.List; import java.util.List;
import java.util.concurrent.ExecutionException;
public class TemplateShopPane extends JPanel { public class TemplateShopPane extends JPanel {
@ -86,10 +86,8 @@ public class TemplateShopPane extends JPanel {
TemplateResourceDetail detail = null; TemplateResourceDetail detail = null;
try { try {
detail = get(); detail = get();
} catch (InterruptedException e) { } catch (Exception e) {
e.printStackTrace(); FineLoggerFactory.getLogger().error(e, e.getMessage());
} catch (ExecutionException e) {
e.printStackTrace();
} }
// detailpane初始化 // detailpane初始化
detailPane = new TemplateResourceDetailPane(detail); detailPane = new TemplateResourceDetailPane(detail);

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

@ -5,6 +5,7 @@ import com.fr.general.CloudCenter;
import com.fr.general.http.HttpToolbox; import com.fr.general.http.HttpToolbox;
import com.fr.json.JSONArray; import com.fr.json.JSONArray;
import com.fr.json.JSONObject; import com.fr.json.JSONObject;
import org.jetbrains.annotations.Nullable;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
@ -56,7 +57,7 @@ public class FineMarketClientHelper {
return FINE_MARKET_TEMPLATE_URL; return FINE_MARKET_TEMPLATE_URL;
} }
public JSONObject getTemplateInfoById(String id) throws IOException { public @Nullable JSONObject getTemplateInfoById(String id) throws IOException {
String url = FINE_MARKET_TEMPLATE_INFO + id; String url = FINE_MARKET_TEMPLATE_INFO + id;
String jsonString = HttpToolbox.get(url); String jsonString = HttpToolbox.get(url);
JSONObject jsonObject = new JSONObject(jsonString); JSONObject jsonObject = new JSONObject(jsonString);
@ -68,7 +69,7 @@ public class FineMarketClientHelper {
} }
} }
public JSONArray getTemplateInfoByName(String name) throws IOException { public @Nullable JSONArray getTemplateInfoByName(String name) throws IOException {
String url = FINE_MARKET_TEMPLATE_INFO + NAME_SEARCH + name; String url = FINE_MARKET_TEMPLATE_INFO + NAME_SEARCH + name;
String jsonString = HttpToolbox.get(url); String jsonString = HttpToolbox.get(url);
JSONObject jsonObject = new JSONObject(jsonString); JSONObject jsonObject = new JSONObject(jsonString);
@ -83,7 +84,7 @@ public class FineMarketClientHelper {
return FINE_MARKET_TEMPLATE_URL + id; return FINE_MARKET_TEMPLATE_URL + id;
} }
public JSONObject getTemplateParentPackageByTemplateId(String id) throws IOException { public @Nullable JSONObject getTemplateParentPackageByTemplateId(String id) throws IOException {
String url = FINE_MARKET_TEMPLATE_INFO + TEMPLATES_PARENT_PACKAGE + id; String url = FINE_MARKET_TEMPLATE_INFO + TEMPLATES_PARENT_PACKAGE + id;
String jsonString = HttpToolbox.get(url); String jsonString = HttpToolbox.get(url);
JSONObject jsonObject = new JSONObject(jsonString); JSONObject jsonObject = new JSONObject(jsonString);

Loading…
Cancel
Save