fix(接口测试): 修复接口测试文档中某版本没有接口会出现sql错误的情况
--bug=1016792 --user=宋天阳 【接口测试】接口文档-按版本筛选-报sql错误 https://www.tapd.cn/55049933/s/1244287
This commit is contained in:
parent
a16a245bb8
commit
bb3bea2b8d
|
@ -77,7 +77,8 @@ public class ShareInfoService {
|
||||||
apiDocumentInfoDTOS = this.findApiDocumentSimpleInfoByRequest(apiDocumentRequest, goPage, pageSize);
|
apiDocumentInfoDTOS = this.findApiDocumentSimpleInfoByRequest(apiDocumentRequest, goPage, pageSize);
|
||||||
}
|
}
|
||||||
PageHelper.clearPage();
|
PageHelper.clearPage();
|
||||||
|
List<ApiDocumentInfoDTO> returnList = new ArrayList<>();
|
||||||
|
if (CollectionUtils.isNotEmpty(apiDocumentInfoDTOS)) {
|
||||||
List<String> apiModuleIdList = new ArrayList<>();
|
List<String> apiModuleIdList = new ArrayList<>();
|
||||||
LogUtil.info("查找模块相关信息");
|
LogUtil.info("查找模块相关信息");
|
||||||
List<String> userIdList = new ArrayList<>();
|
List<String> userIdList = new ArrayList<>();
|
||||||
|
@ -95,7 +96,9 @@ public class ShareInfoService {
|
||||||
Map<String, User> seletedUserMap = userService.getUserIdMapByIds(userIdList);
|
Map<String, User> seletedUserMap = userService.getUserIdMapByIds(userIdList);
|
||||||
Map<String, String> moduleNameMap = apiModuleService.getApiModuleNameDicByIds(apiModuleIdList);
|
Map<String, String> moduleNameMap = apiModuleService.getApiModuleNameDicByIds(apiModuleIdList);
|
||||||
LogUtil.info("开始遍历组装数据");
|
LogUtil.info("开始遍历组装数据");
|
||||||
List<ApiDocumentInfoDTO> returnList = this.conversionModelListToDTO(apiDocumentInfoDTOS, seletedUserMap, moduleNameMap);
|
returnList = this.conversionModelListToDTO(apiDocumentInfoDTOS, seletedUserMap, moduleNameMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return PageUtils.setPageInfo(page, returnList);
|
return PageUtils.setPageInfo(page, returnList);
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectNameByIds" resultType="io.metersphere.api.dto.definition.ApiModuleDTO">
|
<select id="selectNameByIds" resultType="io.metersphere.api.dto.definition.ApiModuleDTO">
|
||||||
SELECT name
|
SELECT id,name
|
||||||
FROM api_module
|
FROM api_module
|
||||||
WHERE id IN
|
WHERE id IN
|
||||||
<foreach collection="ids" item="id" separator="," open="(" close=")">
|
<foreach collection="ids" item="id" separator="," open="(" close=")">
|
||||||
|
|
Loading…
Reference in New Issue