fix: 图表修改

This commit is contained in:
guoyuqi 2021-10-29 18:52:50 +08:00 committed by 刘瑞斌
parent a8f2e17476
commit 4cfb2e38ad
7 changed files with 27 additions and 7 deletions

View File

@ -141,7 +141,8 @@
</sql>
<select id="listModule" resultType="java.lang.Integer">
select count(id) from api_scenario
select count(api_scenario.id) from api_scenario
left join project on api_scenario.project_id = project.id
<include refid="queryWhereCondition"/>
</select>

View File

@ -540,7 +540,8 @@
</select>
<select id="moduleCount" resultType="java.lang.Integer">
SELECT count(id) FROM api_test_case
SELECT count(api_test_case.id) FROM api_test_case
left join project on api_test_case.project_id = project.id
<include refid="criCondition"/>
</select>
@ -687,6 +688,9 @@
<property name="objectKey" value="request.combine.tags"/>
</include>
</if>
<if test="request.workspaceId != null">
AND project.workspace_id = #{request.workspaceId}
</if>
</where>
</sql>

View File

@ -30,7 +30,8 @@
SELECT * FROM issues WHERE issues.project_id = #{projectId} ORDER BY num DESC LIMIT 1;
</select>
<select id="getCountByStatus" resultType="io.metersphere.base.domain.IssuesDao">
select count(id) as totalIssueCount, ifnull(issues.status,issues.platform_status) as status from issues
select count(issues.id) as totalIssueCount, ifnull(issues.status,issues.platform_status) as status from issues
left join project on issues.project_id = project.id
<include refid="queryWhereCondition"/>
group by status;
</select>

View File

@ -193,7 +193,8 @@
</select>
<select id="moduleCount" resultType="java.lang.Integer">
select count(id) from load_test
select count(load_test.id) from load_test
left join project on load_test.project_id = project.id
<where>
<if test="request.combine != null">
<include refid="countCombine">
@ -202,6 +203,9 @@
<property name="objectKey" value="request.combine.tags"/>
</include>
</if>
<if test="request.workspaceId != null">
AND project.workspace_id = #{request.workspaceId}
</if>
</where>
</select>

View File

@ -185,7 +185,8 @@
<include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.orders"/>
</select>
<select id="moduleCount" resultType="java.lang.Integer">
select count(id) from test_case
select count(test_case.id) from test_case
left join project on test_case.project_id = project.id
<include refid="queryWhereCondition"/>
</select>
@ -289,7 +290,7 @@
<select id="selectIds" resultType="java.lang.String">
select
id
test_case.id
from test_case
<include refid="queryWhereCondition"/>
<include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.orders"/>

View File

@ -35,7 +35,9 @@ public class WorkstationService {
//build query condition object
QueryTestPlanRequest testPlanRequest = new QueryTestPlanRequest();
testPlanRequest.setUserId(userId);
testPlanRequest.setWorkspaceId(SessionUtils.getCurrentWorkspaceId());
ApiTestCaseRequest apiTestCaseRequest = new ApiTestCaseRequest();
apiTestCaseRequest.setWorkspaceId(SessionUtils.getCurrentWorkspaceId());
//@see io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml:103
Map<String, Object> combine = new HashMap<>(2);
Map<String,String>operatorValue = new HashMap<>(2);
@ -45,8 +47,10 @@ public class WorkstationService {
testPlanRequest.setCombine(combine);
apiTestCaseRequest.setCombine(combine);
ApiScenarioRequest apiScenarioRequest = new ApiScenarioRequest();
apiScenarioRequest.setWorkspaceId(SessionUtils.getCurrentWorkspaceId());
apiScenarioRequest.setCombine(combine);
QueryTestCaseRequest testCaseRequest = new QueryTestCaseRequest();
testCaseRequest.setWorkspaceId(SessionUtils.getCurrentWorkspaceId());
testCaseRequest.setCombine(combine);
//query db
int apiScenarioCaseCount = extApiScenarioMapper.listModule(apiScenarioRequest);

View File

@ -171,7 +171,12 @@ export default {
},
mounted() {
this.getProject();
let routeTestCase = this.$route.params.testCase;
if(routeTestCase && routeTestCase.add===true){
this.addTab({name: 'add'});
}else {
this.init(this.$route);
}
},
watch: {
redirectID() {