fix(我的工作台): 修复我的待办接口定义数据查询问题

--bug=1010430--user=郭雨琦 修复我的待办接口定义数据查询问题
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001010430
This commit is contained in:
guoyuqi 2022-02-21 15:18:48 +08:00 committed by xiaomeinvG
parent 3758c0e069
commit 0c61865515
1 changed files with 10 additions and 0 deletions

View File

@ -135,10 +135,20 @@ public class ApiDefinitionService {
if (StringUtils.isNotBlank(request.getProjectId())) {
buildProjectInfo(resList, request.getProjectId());
calculateResult(resList, request.getProjectId());
}else{
buildProjectInfoWidthoutProject(resList);
}
return resList;
}
private void buildProjectInfoWidthoutProject(List<ApiDefinitionResult> resList) {
resList.forEach(i -> {
Project project = projectMapper.selectByPrimaryKey(i.getProjectId());
i.setProjectName(project.getName());
i.setVersionEnable(project.getVersionEnable());
});
}
public void buildUserInfo(List<ApiDefinitionResult> apis) {
if (CollectionUtils.isEmpty(apis)) {
return;