refactor(接口测试): 优化接口定义列表按照用例数排序时字段解析为字符串而非数字的问题

优化接口定义列表按照用例数排序时字段解析为字符串而非数字的问题
This commit is contained in:
song-tianyang 2022-03-31 12:32:54 +08:00 committed by 刘瑞斌
parent f6e64bd399
commit 8e41fe86cf
3 changed files with 6 additions and 2 deletions

View File

@ -1510,7 +1510,7 @@ public class ApiDefinitionService {
}
} else {
res.setCaseType("apiCase");
res.setCaseTotal("-");
res.setCaseTotal("0");
res.setCasePassingRate("-");
res.setCaseStatus("-");
}

View File

@ -257,7 +257,10 @@
<if test="order.name == 'user_name'">
user_name ${order.type}
</if>
<if test="order.name != 'user_name'">
<if test="order.name == 'case_total'">
CONVERT(api_definition.${order.name},SIGNED) ${order.type}
</if>
<if test="order.name != 'user_name' and order.name != 'case_total'">
api_definition.${order.name} ${order.type}
</if>
</foreach>

View File

@ -632,6 +632,7 @@ export default {
if (item.tags && item.tags.length > 0) {
item.tags = JSON.parse(item.tags);
}
item.caseTotal = parseInt(item.caseTotal);
});
this.$emit('getTrashApi');
});