parent
4cc1fc0935
commit
fd554c2098
|
@ -3,12 +3,12 @@ package io.metersphere.api.controller;
|
|||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import io.metersphere.api.dto.*;
|
||||
import io.metersphere.api.dto.dataCount.ApiDataCountResult;
|
||||
import io.metersphere.api.dto.dataCount.ExecutedCaseInfoResult;
|
||||
import io.metersphere.api.dto.dataCount.request.ScheduleInfoRequest;
|
||||
import io.metersphere.api.dto.dataCount.response.ApiDataCountDTO;
|
||||
import io.metersphere.api.dto.dataCount.response.ExecutedCaseInfoDTO;
|
||||
import io.metersphere.api.dto.dataCount.response.TaskInfoResult;
|
||||
import io.metersphere.api.dto.datacount.ApiDataCountResult;
|
||||
import io.metersphere.api.dto.datacount.ExecutedCaseInfoResult;
|
||||
import io.metersphere.api.dto.datacount.request.ScheduleInfoRequest;
|
||||
import io.metersphere.api.dto.datacount.response.ApiDataCountDTO;
|
||||
import io.metersphere.api.dto.datacount.response.ExecutedCaseInfoDTO;
|
||||
import io.metersphere.api.dto.datacount.response.TaskInfoResult;
|
||||
import io.metersphere.api.dto.scenario.request.dubbo.RegistryCenter;
|
||||
import io.metersphere.api.service.*;
|
||||
import io.metersphere.base.domain.ApiTest;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.api.dto.dataCount;
|
||||
package io.metersphere.api.dto.datacount;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.api.dto.dataCount;
|
||||
package io.metersphere.api.dto.datacount;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.api.dto.dataCount.request;
|
||||
package io.metersphere.api.dto.datacount.request;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
|
@ -1,6 +1,6 @@
|
|||
package io.metersphere.api.dto.dataCount.response;
|
||||
package io.metersphere.api.dto.datacount.response;
|
||||
|
||||
import io.metersphere.api.dto.dataCount.ApiDataCountResult;
|
||||
import io.metersphere.api.dto.datacount.ApiDataCountResult;
|
||||
import io.metersphere.api.dto.scenario.request.RequestType;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.api.dto.dataCount.response;
|
||||
package io.metersphere.api.dto.datacount.response;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
|
@ -1,8 +1,7 @@
|
|||
package io.metersphere.api.dto.dataCount.response;
|
||||
package io.metersphere.api.dto.datacount.response;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.python.antlr.ast.Str;
|
||||
|
||||
/**
|
||||
* 任务信息 返回DTO
|
|
@ -6,7 +6,7 @@ import com.alibaba.fastjson.JSONObject;
|
|||
import io.metersphere.api.dto.APIReportResult;
|
||||
import io.metersphere.api.dto.DeleteAPIReportRequest;
|
||||
import io.metersphere.api.dto.QueryAPIReportRequest;
|
||||
import io.metersphere.api.dto.dataCount.ApiDataCountResult;
|
||||
import io.metersphere.api.dto.datacount.ApiDataCountResult;
|
||||
import io.metersphere.api.jmeter.TestResult;
|
||||
import io.metersphere.base.domain.*;
|
||||
import io.metersphere.base.mapper.ApiDataViewMapper;
|
||||
|
|
|
@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONObject;
|
|||
import com.alibaba.nacos.client.utils.StringUtils;
|
||||
import io.github.ningyu.jmeter.plugin.dubbo.sample.ProviderService;
|
||||
import io.metersphere.api.dto.*;
|
||||
import io.metersphere.api.dto.dataCount.ApiDataCountResult;
|
||||
import io.metersphere.api.dto.parse.ApiImport;
|
||||
import io.metersphere.api.dto.scenario.request.dubbo.RegistryCenter;
|
||||
import io.metersphere.api.jmeter.JMeterService;
|
||||
|
|
|
@ -7,7 +7,7 @@ import com.fasterxml.jackson.databind.DeserializationFeature;
|
|||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.google.gson.Gson;
|
||||
import io.metersphere.api.dto.automation.*;
|
||||
import io.metersphere.api.dto.dataCount.ApiDataCountResult;
|
||||
import io.metersphere.api.dto.datacount.ApiDataCountResult;
|
||||
import io.metersphere.api.dto.definition.RunDefinitionRequest;
|
||||
import io.metersphere.api.dto.definition.request.*;
|
||||
import io.metersphere.api.dto.scenario.KeyValue;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package io.metersphere.api.service;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.metersphere.api.dto.dataCount.ExecutedCaseInfoResult;
|
||||
import io.metersphere.api.dto.datacount.ExecutedCaseInfoResult;
|
||||
import io.metersphere.api.jmeter.TestResult;
|
||||
import io.metersphere.base.domain.ApiDefinitionExecResult;
|
||||
import io.metersphere.base.domain.ApiDefinitionExecResultExample;
|
||||
|
|
|
@ -6,7 +6,7 @@ import io.metersphere.api.dto.APIReportResult;
|
|||
import io.metersphere.api.dto.ApiTestImportRequest;
|
||||
import io.metersphere.api.dto.automation.ApiScenarioRequest;
|
||||
import io.metersphere.api.dto.automation.ReferenceDTO;
|
||||
import io.metersphere.api.dto.dataCount.ApiDataCountResult;
|
||||
import io.metersphere.api.dto.datacount.ApiDataCountResult;
|
||||
import io.metersphere.api.dto.definition.*;
|
||||
import io.metersphere.api.dto.definition.parse.ApiDefinitionImport;
|
||||
import io.metersphere.api.dto.scenario.request.RequestType;
|
||||
|
|
|
@ -1,15 +1,12 @@
|
|||
package io.metersphere.api.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.metersphere.api.dto.dataCount.ApiDataCountResult;
|
||||
import io.metersphere.api.dto.datacount.ApiDataCountResult;
|
||||
import io.metersphere.api.dto.definition.ApiTestCaseRequest;
|
||||
import io.metersphere.api.dto.definition.ApiTestCaseResult;
|
||||
import io.metersphere.api.dto.definition.SaveApiTestCaseRequest;
|
||||
import io.metersphere.api.dto.ApiCaseBatchRequest;
|
||||
import io.metersphere.api.dto.definition.ApiTestCaseDTO;
|
||||
import io.metersphere.api.dto.definition.ApiTestCaseRequest;
|
||||
import io.metersphere.api.dto.definition.ApiTestCaseResult;
|
||||
import io.metersphere.api.dto.definition.SaveApiTestCaseRequest;
|
||||
import io.metersphere.base.domain.*;
|
||||
import io.metersphere.base.mapper.ApiTestCaseMapper;
|
||||
import io.metersphere.base.mapper.ApiTestFileMapper;
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
package io.metersphere.base.mapper;
|
||||
|
||||
import io.metersphere.api.dto.dataCount.response.TaskInfoResult;
|
||||
import io.metersphere.base.domain.Schedule;
|
||||
import io.metersphere.base.domain.ScheduleExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.apache.ibatis.annotations.Update;
|
||||
import org.python.antlr.ast.Str;
|
||||
|
||||
public interface ScheduleMapper {
|
||||
long countByExample(ScheduleExample example);
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
package io.metersphere.base.mapper.ext;
|
||||
|
||||
import io.metersphere.api.dto.dataCount.ExecutedCaseInfoResult;
|
||||
import io.metersphere.api.dto.datacount.ExecutedCaseInfoResult;
|
||||
import io.metersphere.base.domain.ApiDefinitionExecResult;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
WHERE testCase.project_id = #{projectId})
|
||||
</select>
|
||||
|
||||
<select id="findFaliureCaseInfoByProjectIDAndExecuteTimeAndLimitNumber" resultType="io.metersphere.api.dto.dataCount.ExecutedCaseInfoResult">
|
||||
<select id="findFaliureCaseInfoByProjectIDAndExecuteTimeAndLimitNumber" resultType="io.metersphere.api.dto.datacount.ExecutedCaseInfoResult">
|
||||
SELECT * FROM (
|
||||
SELECT testCase.testCaseName AS caseName,testCase.testPlanName AS testPlan ,caseErrorCountData.dataCountNumber AS failureTimes,'apiCase' AS caseType
|
||||
FROM (
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
package io.metersphere.base.mapper.ext;
|
||||
|
||||
import io.metersphere.api.dto.dataCount.ApiDataCountResult;
|
||||
import io.metersphere.api.dto.datacount.ApiDataCountResult;
|
||||
import io.metersphere.api.dto.definition.ApiComputeResult;
|
||||
import io.metersphere.api.dto.definition.ApiDefinitionRequest;
|
||||
import io.metersphere.api.dto.definition.ApiDefinitionResult;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -274,10 +274,10 @@
|
|||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="countProtocolByProjectID" resultType="io.metersphere.api.dto.dataCount.ApiDataCountResult">
|
||||
<select id="countProtocolByProjectID" resultType="io.metersphere.api.dto.datacount.ApiDataCountResult">
|
||||
SELECT protocol AS groupField,count(id) AS countNumber FROM api_definition WHERE project_id = #{0} GROUP BY protocol
|
||||
</select>
|
||||
<select id="countStateByProjectID" resultType="io.metersphere.api.dto.dataCount.ApiDataCountResult">
|
||||
<select id="countStateByProjectID" resultType="io.metersphere.api.dto.datacount.ApiDataCountResult">
|
||||
SELECT status AS groupField,count(id) AS countNumber FROM api_definition WHERE project_id = #{0} GROUP BY status
|
||||
</select>
|
||||
<select id="countByProjectIDAndCreateInThisWeek" resultType="java.lang.Long">
|
||||
|
@ -285,7 +285,7 @@
|
|||
WHERE project_id = #{projectId}
|
||||
AND create_time BETWEEN #{firstDayTimestamp} AND #{lastDayTimestamp}
|
||||
</select>
|
||||
<select id="countApiCoverageByProjectID" resultType="io.metersphere.api.dto.dataCount.ApiDataCountResult">
|
||||
<select id="countApiCoverageByProjectID" resultType="io.metersphere.api.dto.datacount.ApiDataCountResult">
|
||||
SELECT count(api.id) AS countNumber, if(test_case_api.api_definition_id is null,"uncoverage","coverage") AS groupField FROM api_definition api left Join (
|
||||
SELECT DISTINCT api_definition_id FROM api_test_case
|
||||
) test_case_api ON api.id = test_case_api.api_definition_id
|
||||
|
|
|
@ -2,11 +2,10 @@ package io.metersphere.base.mapper.ext;
|
|||
|
||||
import io.metersphere.api.dto.automation.ApiScenarioDTO;
|
||||
import io.metersphere.api.dto.automation.ApiScenarioRequest;
|
||||
import io.metersphere.api.dto.dataCount.ApiDataCountResult;
|
||||
import io.metersphere.api.dto.datacount.ApiDataCountResult;
|
||||
import io.metersphere.base.domain.ApiScenario;
|
||||
import io.metersphere.base.domain.ApiScenarioWithBLOBs;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@
|
|||
AND create_time BETWEEN #{firstDayTimestamp} AND #{lastDayTimestamp}
|
||||
</select>
|
||||
|
||||
<select id="countRunResultByProjectID" resultType="io.metersphere.api.dto.dataCount.ApiDataCountResult">
|
||||
<select id="countRunResultByProjectID" resultType="io.metersphere.api.dto.datacount.ApiDataCountResult">
|
||||
SELECT count(id) AS countNumber, if(last_result is null,"notRun",last_result) AS groupField FROM api_scenario
|
||||
WHERE project_id = #{0}
|
||||
GROUP BY groupField
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package io.metersphere.base.mapper.ext;
|
||||
|
||||
import io.metersphere.api.dto.dataCount.ApiDataCountResult;
|
||||
import io.metersphere.api.dto.datacount.ApiDataCountResult;
|
||||
import io.metersphere.api.dto.definition.ApiTestCaseDTO;
|
||||
import io.metersphere.api.dto.definition.ApiTestCaseRequest;
|
||||
import io.metersphere.api.dto.definition.ApiTestCaseResult;
|
||||
|
|
|
@ -2,11 +2,9 @@ package io.metersphere.base.mapper.ext;
|
|||
|
||||
import io.metersphere.api.dto.APIReportResult;
|
||||
import io.metersphere.api.dto.QueryAPIReportRequest;
|
||||
import io.metersphere.api.dto.dataCount.ApiDataCountResult;
|
||||
import io.metersphere.dto.ApiReportDTO;
|
||||
import io.metersphere.api.dto.datacount.ApiDataCountResult;
|
||||
import io.metersphere.dto.DashboardTestDTO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -152,7 +152,7 @@
|
|||
GROUP BY x
|
||||
</select>
|
||||
|
||||
<select id="countByWorkspaceIdAndGroupGroupByExecuteResult" resultType="io.metersphere.api.dto.dataCount.ApiDataCountResult">
|
||||
<select id="countByWorkspaceIdAndGroupGroupByExecuteResult" resultType="io.metersphere.api.dto.datacount.ApiDataCountResult">
|
||||
SELECT testReport.`status` AS groupField,COUNT(testReportDetail.report_id) AS countNumber
|
||||
FROM api_test_report_detail testReportDetail
|
||||
INNER JOIN `schedule` sch ON sch.resource_id = testReportDetail.test_id
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
package io.metersphere.base.mapper.ext;
|
||||
|
||||
import io.metersphere.api.dto.dataCount.response.TaskInfoResult;
|
||||
import io.metersphere.api.dto.datacount.response.TaskInfoResult;
|
||||
import io.metersphere.controller.request.QueryScheduleRequest;
|
||||
import io.metersphere.dto.ScheduleDao;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
AND `group` = #{group}
|
||||
AND create_time BETWEEN #{startTime} and #{endTime}
|
||||
</select>
|
||||
<select id="findRunningTaskInfoByWorkspaceID" resultType="io.metersphere.api.dto.dataCount.response.TaskInfoResult">
|
||||
<select id="findRunningTaskInfoByWorkspaceID" resultType="io.metersphere.api.dto.datacount.response.TaskInfoResult">
|
||||
SELECT apiTest.`name` AS scenario,sch.id AS taskID,sch.`value` AS rule,sch.`enable` AS `taskStatus`,u.`name` AS creator,sch.update_time AS updateTime
|
||||
FROM api_test apiTest
|
||||
INNER JOIN `schedule` sch ON apiTest.id = sch.resource_id
|
||||
|
|
|
@ -2,6 +2,7 @@ package io.metersphere.controller;
|
|||
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import io.metersphere.base.domain.Schedule;
|
||||
import io.metersphere.controller.request.QueryScheduleRequest;
|
||||
import io.metersphere.dto.ScheduleDao;
|
||||
import io.metersphere.service.ScheduleService;
|
||||
|
@ -22,4 +23,9 @@ public class ScheduleController {
|
|||
return scheduleService.list(request);
|
||||
}
|
||||
|
||||
@GetMapping("/findOne/{testId}/{group}")
|
||||
public Schedule schedule(@PathVariable String testId,@PathVariable String group) {
|
||||
Schedule schedule = scheduleService.getScheduleByResource(testId,group);
|
||||
return schedule;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package io.metersphere.service;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.metersphere.api.dto.dataCount.response.TaskInfoResult;
|
||||
import io.metersphere.api.dto.datacount.response.TaskInfoResult;
|
||||
import io.metersphere.base.domain.Schedule;
|
||||
import io.metersphere.base.domain.ScheduleExample;
|
||||
import io.metersphere.base.domain.User;
|
||||
|
|
Loading…
Reference in New Issue