diff --git a/backend/src/main/java/io/dataease/commons/utils/HttpClientConfig.java b/backend/src/main/java/io/dataease/commons/utils/HttpClientConfig.java index 819ac172ce..8786d3fcb0 100755 --- a/backend/src/main/java/io/dataease/commons/utils/HttpClientConfig.java +++ b/backend/src/main/java/io/dataease/commons/utils/HttpClientConfig.java @@ -15,9 +15,9 @@ public class HttpClientConfig { private Map header = new HashMap<>(); // 设置连接超时时间,单位毫秒 - private int connectTimeout = 5000; + private int connectTimeout = 30000; // 设置从connect Manager获取Connection 超时时间,单位毫秒。这个属性是新加的属性,因为目前版本是可以共享连接池的 - private int connectionRequestTimeout = 5000; + private int connectionRequestTimeout = 30000; // 请求获取数据的超时时间,单位毫秒。 如果访问一个接口,多少时间内无法返回数据,就直接放弃此次调用 private int socketTimeout = 60000; diff --git a/backend/src/main/java/io/dataease/dto/templateMarket/TemplateCategory.java b/backend/src/main/java/io/dataease/dto/templateMarket/TemplateCategory.java index dd78b81ec4..29dee68bf8 100644 --- a/backend/src/main/java/io/dataease/dto/templateMarket/TemplateCategory.java +++ b/backend/src/main/java/io/dataease/dto/templateMarket/TemplateCategory.java @@ -14,4 +14,6 @@ public class TemplateCategory { private String name; private String slug; + + private Integer priority; } diff --git a/backend/src/main/java/io/dataease/service/templateMarket/TemplateMarketService.java b/backend/src/main/java/io/dataease/service/templateMarket/TemplateMarketService.java index 427d111358..658c23aa91 100644 --- a/backend/src/main/java/io/dataease/service/templateMarket/TemplateMarketService.java +++ b/backend/src/main/java/io/dataease/service/templateMarket/TemplateMarketService.java @@ -17,6 +17,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import javax.annotation.Resource; +import java.util.Comparator; import java.util.List; import java.util.stream.Collectors; @@ -76,7 +77,7 @@ public class TemplateMarketService { String resultStr = marketGet(basicInfo.getTemplateMarketUlr()+CATEGORIES_API,basicInfo.getTemplateAccessKey()); List categories = JSONObject.parseObject(resultStr).getJSONArray("data").toJavaList(TemplateCategory.class); if(CollectionUtils.isNotEmpty(categories)){ - return categories.stream().map(TemplateCategory :: getName).collect(Collectors.toList()); + return categories.stream().sorted(Comparator.comparing(TemplateCategory::getPriority)).map(TemplateCategory :: getName).collect(Collectors.toList()); }else{ return null; }