mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-05 05:29:29 +08:00
refactor(接口测试): 优化接口对应的mock查询方法
Signed-off-by: fit2-zhao <yong.zhao@fit2cloud.com>
This commit is contained in:
parent
c8afef1648
commit
cac83d3fb6
@ -14,16 +14,14 @@
|
||||
</select>
|
||||
<select id="selectByApiIdIn" resultType="io.metersphere.api.dto.mock.config.MockConfigImportDTO">
|
||||
SELECT
|
||||
mock_expect_config.*,
|
||||
mock_config.api_id AS apiId
|
||||
mock_expect_config.*,mock_config.api_id AS apiId
|
||||
FROM
|
||||
mock_expect_config
|
||||
LEFT JOIN mock_config ON mock_expect_config.mock_config_id = mock_config.id
|
||||
WHERE mock_config.api_id in (
|
||||
<foreach collection="values" item="value" separator="," open="(" close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
)
|
||||
WHERE mock_config.api_id in
|
||||
<foreach collection="values" item="value" separator="," open="(" close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="selectExlectNumByMockConfigId" resultType="java.lang.String">
|
||||
|
@ -1438,6 +1438,7 @@ public class ApiDefinitionService {
|
||||
|
||||
public ApiExportResult export(ApiBatchRequest request, String type) {
|
||||
ServiceUtils.getSelectAllIds(request, request.getCondition(), (query) -> extApiDefinitionMapper.selectIds(query));
|
||||
LogUtil.info("导出总量 ",request.getIds());
|
||||
|
||||
List<ApiDefinitionWithBLOBs> apiDefinitions = getByIds(request.getIds());
|
||||
|
||||
@ -1450,6 +1451,7 @@ public class ApiDefinitionService {
|
||||
msApiExportResult.setProtocol(request.getProtocol());
|
||||
msApiExportResult.setProjectId(request.getProjectId());
|
||||
msApiExportResult.setVersion(System.getenv("MS_VERSION"));
|
||||
LogUtil.info("导出数据组装完成 ",request.getIds());
|
||||
return msApiExportResult;
|
||||
} else { // 导出为 Swagger 格式
|
||||
Swagger3Parser swagger3Parser = new Swagger3Parser();
|
||||
|
Loading…
Reference in New Issue
Block a user