fix: 首页7天失败案例、定时任务成功失败次数

修首页7天失败案例未只统计测试计划的数据的问题、定时任务成功失败次数统计不对的问题
This commit is contained in:
song.tianyang 2020-12-24 16:01:36 +08:00
parent 0d524415b6
commit 8d3f281453
3 changed files with 5 additions and 3 deletions

View File

@ -37,8 +37,8 @@
SELECT testCase.testCaseName AS caseName,testCase.testPlanName AS testPlan ,caseErrorCountData.dataCountNumber AS failureTimes,'apiCase' AS caseType
FROM (
SELECT apiCase.id AS testCaseID,apiCase.`name` AS testCaseName,group_concat(testPlan.`name`) AS testPlanName FROM api_test_case apiCase
LEFT JOIN test_plan_api_case testPlanCase ON testPlanCase.api_case_id = apiCase.id
LEFT JOIN test_plan testPlan ON testPlan.id = testPlanCase.test_plan_id
INNER JOIN test_plan_api_case testPlanCase ON testPlanCase.api_case_id = apiCase.id
INNER JOIN test_plan testPlan ON testPlan.id = testPlanCase.test_plan_id
GROUP BY apiCase.id
ORDER BY apiCase.create_time DESC
)testCase
@ -54,7 +54,7 @@
FROM api_scenario_report report
INNER JOIN api_scenario_report_detail reportDetail ON report.id = reportDetail.report_id
INNER JOIN api_scenario scene ON report.scenario_id = scene.id
LEFT JOIN
INNER JOIN
(
SELECT
apiScene.api_scenario_id,

View File

@ -192,5 +192,6 @@
SELECT acitem.`name`,acitem.id FROM api_scenario acitem INNER JOIN `schedule` sc ON acitem.id = sc.resource_id
) ac on ar.scenario_id = ac.id
WHERE acr.project_id = #{projectId}
GROUP BY groupField;
</select>
</mapper>

View File

@ -160,6 +160,7 @@
WHERE sch.resource_id IN (
SELECT id FROM api_test WHERE project_id = #{projectId,jdbcType=VARCHAR}
)
GROUP BY groupField;
</select>
<select id="countByProjectIDAndCreateInThisWeek" resultType="java.lang.Long">