refactor: 更改不规范的包命名

更改不规范的包命名
This commit is contained in:
song.tianyang 2020-12-22 14:01:45 +08:00
parent 4cc1fc0935
commit fd554c2098
27 changed files with 38 additions and 47 deletions

View File

@ -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;

View File

@ -1,4 +1,4 @@
package io.metersphere.api.dto.dataCount;
package io.metersphere.api.dto.datacount;
import lombok.Getter;
import lombok.Setter;

View File

@ -1,4 +1,4 @@
package io.metersphere.api.dto.dataCount;
package io.metersphere.api.dto.datacount;
import lombok.Getter;
import lombok.Setter;

View File

@ -1,4 +1,4 @@
package io.metersphere.api.dto.dataCount.request;
package io.metersphere.api.dto.datacount.request;
import lombok.Getter;
import lombok.Setter;

View File

@ -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;

View File

@ -1,4 +1,4 @@
package io.metersphere.api.dto.dataCount.response;
package io.metersphere.api.dto.datacount.response;
import lombok.Getter;
import lombok.Setter;

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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 (

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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;
}
}

View File

@ -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;