fix(接口测试): 接口测试首页的7天有更新接口统计,按照更新时间排序

--bug=1027135 --user=宋天阳 【接口测试】接口首页-过去7天有更新的接口,排序无规则,建议按更新时间排序
https://www.tapd.cn/55049933/s/1385698
This commit is contained in:
song-tianyang 2023-06-25 18:03:53 +08:00 committed by 建国
parent c4a6ff257e
commit 1f4190e1a1
1 changed files with 11 additions and 1 deletions

View File

@ -44,6 +44,7 @@ import io.metersphere.notice.sender.NoticeModel;
import io.metersphere.notice.service.NoticeSendService;
import io.metersphere.plugin.core.MsTestElement;
import io.metersphere.quota.service.BaseQuotaService;
import io.metersphere.request.OrderRequest;
import io.metersphere.request.RelationshipEdgeRequest;
import io.metersphere.request.ResetOrderRequest;
import io.metersphere.request.SyncApiDefinitionRequest;
@ -296,8 +297,17 @@ public class ApiDefinitionService {
return new ArrayList<>(0);
} else {
ApiDefinitionRequest request = new ApiDefinitionRequest();
request.setOrders(
new ArrayList<>() {{
add(new OrderRequest() {{
this.setName("update_time");
this.setType("desc");
}}
);
}}
);
request.setProjectId(projectId);
request = this.initRequest(request, true, true);
request = this.initRequest(request, false, true);
request.setNotEqStatus(ApiTestDataStatus.TRASH.getValue());
if (StringUtils.isNotBlank(versionId)) {
request.setVersionId(versionId);