新增torna排序

This commit is contained in:
Forget 2021-05-29 14:31:11 +08:00
parent c9441c6469
commit 37bcd3ff7c
4 changed files with 13 additions and 0 deletions

View File

@ -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));

View File

@ -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));

View File

@ -37,6 +37,7 @@ public class Apis {
private String parentId;
private String isShow;
private String author;
private Integer orderIndex;
private DubboInfo dubboInfo;
private List<HttpParam> headerParams;
private List<HttpParam> pathParams;
@ -46,6 +47,14 @@ public class Apis {
private String errorCodeParams;
private List<Apis> items;
public Integer getOrderIndex() {
return orderIndex;
}
public void setOrderIndex(Integer orderIndex) {
this.orderIndex = orderIndex;
}
public String getAuthor() {
return author;
}

View File

@ -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()));