diff --git a/src/main/java/com/power/doc/builder/TornaBuilder.java b/src/main/java/com/power/doc/builder/TornaBuilder.java index 8191573..463ba16 100644 --- a/src/main/java/com/power/doc/builder/TornaBuilder.java +++ b/src/main/java/com/power/doc/builder/TornaBuilder.java @@ -98,6 +98,7 @@ public class TornaBuilder { api.setItems(buildApis(a.getList(), TornaUtil.setDebugEnv(apiConfig, tornaApi))); api.setIsFolder(TornaConstants.YES); api.setAuthor(a.getAuthor()); + api.setOrderIndex(a.getOrder()); apisList.add(api); } tornaApi.setCommonErrorCodes(buildErrorCode(apiConfig)); diff --git a/src/main/java/com/power/doc/builder/rpc/RpcTornaBuilder.java b/src/main/java/com/power/doc/builder/rpc/RpcTornaBuilder.java index db931b4..b9a2f76 100644 --- a/src/main/java/com/power/doc/builder/rpc/RpcTornaBuilder.java +++ b/src/main/java/com/power/doc/builder/rpc/RpcTornaBuilder.java @@ -100,6 +100,7 @@ public class RpcTornaBuilder { .setVersion(a.getVersion()) .setDependency(TornaUtil.buildDependencies(apiConfig.getRpcApiDependencies())) .setInterfaceName(a.getName())); + api.setOrderIndex(a.getOrder()); apisList.add(api); } tornaApi.setCommonErrorCodes(buildErrorCode(apiConfig)); diff --git a/src/main/java/com/power/doc/model/torna/Apis.java b/src/main/java/com/power/doc/model/torna/Apis.java index b99abdc..c148367 100644 --- a/src/main/java/com/power/doc/model/torna/Apis.java +++ b/src/main/java/com/power/doc/model/torna/Apis.java @@ -37,6 +37,7 @@ public class Apis { private String parentId; private String isShow; private String author; + private Integer orderIndex; private DubboInfo dubboInfo; private List headerParams; private List pathParams; @@ -46,6 +47,14 @@ public class Apis { private String errorCodeParams; private List items; + public Integer getOrderIndex() { + return orderIndex; + } + + public void setOrderIndex(Integer orderIndex) { + this.orderIndex = orderIndex; + } + public String getAuthor() { return author; } diff --git a/src/main/java/com/power/doc/utils/TornaUtil.java b/src/main/java/com/power/doc/utils/TornaUtil.java index ae0b511..dadf576 100644 --- a/src/main/java/com/power/doc/utils/TornaUtil.java +++ b/src/main/java/com/power/doc/utils/TornaUtil.java @@ -92,6 +92,7 @@ public class TornaUtil { methodApi.setDescription(apiMethodDoc.getDetail()); methodApi.setIsShow(TornaConstants.YES); methodApi.setAuthor(apiMethodDoc.getAuthor()); + methodApi.setOrderIndex(apiMethodDoc.getOrder()); methodApi.setHeaderParams(buildHerder(apiMethodDoc.getRequestHeaders())); methodApi.setResponseParams(buildParams(apiMethodDoc.getResponseParams())); @@ -132,6 +133,7 @@ public class TornaUtil { methodApi.setAuthor(apiMethodDoc.getAuthor()); methodApi.setUrl(apiMethodDoc.getMethodDefinition()); methodApi.setResponseParams(buildParams(apiMethodDoc.getResponseParams())); + methodApi.setOrderIndex(apiMethodDoc.getOrder()); //Json if (CollectionUtil.isNotEmpty(apiMethodDoc.getRequestParams())) { methodApi.setRequestParams(buildParams(apiMethodDoc.getRequestParams()));