parent
e15672af3d
commit
aeb9c52661
|
@ -37,11 +37,11 @@ public class TestPlanReportContentWithBLOBs extends TestPlanReportContent implem
|
||||||
|
|
||||||
private String loadFailureCases;
|
private String loadFailureCases;
|
||||||
|
|
||||||
private String scenarioReportId;
|
private String planScenarioReportStruct;
|
||||||
|
|
||||||
private String apiCaseReportId;
|
private String planApiCaseReportStruct;
|
||||||
|
|
||||||
private String loadCaseReportId;
|
private String planLoadCaseReportStruct;
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
}
|
}
|
|
@ -26,9 +26,9 @@
|
||||||
<result column="scenario_failure_cases" jdbcType="LONGVARCHAR" property="scenarioFailureCases" />
|
<result column="scenario_failure_cases" jdbcType="LONGVARCHAR" property="scenarioFailureCases" />
|
||||||
<result column="load_all_Cases" jdbcType="LONGVARCHAR" property="loadAllCases" />
|
<result column="load_all_Cases" jdbcType="LONGVARCHAR" property="loadAllCases" />
|
||||||
<result column="load_failure_cases" jdbcType="LONGVARCHAR" property="loadFailureCases" />
|
<result column="load_failure_cases" jdbcType="LONGVARCHAR" property="loadFailureCases" />
|
||||||
<result column="scenario_report_id" jdbcType="LONGVARCHAR" property="scenarioReportId" />
|
<result column="plan_scenario_report_struct" jdbcType="LONGVARCHAR" property="planScenarioReportStruct" />
|
||||||
<result column="api_case_report_id" jdbcType="LONGVARCHAR" property="apiCaseReportId" />
|
<result column="plan_api_case_report_struct" jdbcType="LONGVARCHAR" property="planApiCaseReportStruct" />
|
||||||
<result column="load_case_report_id" jdbcType="LONGVARCHAR" property="loadCaseReportId" />
|
<result column="plan_load_case_report_struct" jdbcType="LONGVARCHAR" property="planLoadCaseReportStruct" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Example_Where_Clause">
|
<sql id="Example_Where_Clause">
|
||||||
<where>
|
<where>
|
||||||
|
@ -95,7 +95,8 @@
|
||||||
<sql id="Blob_Column_List">
|
<sql id="Blob_Column_List">
|
||||||
config, summary, function_result, api_result, load_result, function_all_cases, function_failure_cases,
|
config, summary, function_result, api_result, load_result, function_all_cases, function_failure_cases,
|
||||||
issue_list, api_all_cases, api_failure_cases, scenario_all_cases, scenario_failure_cases,
|
issue_list, api_all_cases, api_failure_cases, scenario_all_cases, scenario_failure_cases,
|
||||||
load_all_Cases, load_failure_cases, scenario_report_id, api_case_report_id, load_case_report_id
|
load_all_Cases, load_failure_cases, plan_scenario_report_struct, plan_api_case_report_struct,
|
||||||
|
plan_load_case_report_struct
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.base.domain.TestPlanReportContentExample" resultMap="ResultMapWithBLOBs">
|
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.base.domain.TestPlanReportContentExample" resultMap="ResultMapWithBLOBs">
|
||||||
select
|
select
|
||||||
|
@ -154,8 +155,8 @@
|
||||||
issue_list, api_all_cases, api_failure_cases,
|
issue_list, api_all_cases, api_failure_cases,
|
||||||
scenario_all_cases, scenario_failure_cases,
|
scenario_all_cases, scenario_failure_cases,
|
||||||
load_all_Cases, load_failure_cases,
|
load_all_Cases, load_failure_cases,
|
||||||
scenario_report_id, api_case_report_id,
|
plan_scenario_report_struct, plan_api_case_report_struct,
|
||||||
load_case_report_id)
|
plan_load_case_report_struct)
|
||||||
values (#{id,jdbcType=VARCHAR}, #{testPlanReportId,jdbcType=VARCHAR}, #{startTime,jdbcType=BIGINT},
|
values (#{id,jdbcType=VARCHAR}, #{testPlanReportId,jdbcType=VARCHAR}, #{startTime,jdbcType=BIGINT},
|
||||||
#{caseCount,jdbcType=BIGINT}, #{endTime,jdbcType=BIGINT}, #{executeRate,jdbcType=DOUBLE},
|
#{caseCount,jdbcType=BIGINT}, #{endTime,jdbcType=BIGINT}, #{executeRate,jdbcType=DOUBLE},
|
||||||
#{passRate,jdbcType=DOUBLE}, #{isThirdPartIssue,jdbcType=BIT}, #{config,jdbcType=LONGVARCHAR},
|
#{passRate,jdbcType=DOUBLE}, #{isThirdPartIssue,jdbcType=BIT}, #{config,jdbcType=LONGVARCHAR},
|
||||||
|
@ -164,8 +165,8 @@
|
||||||
#{issueList,jdbcType=LONGVARCHAR}, #{apiAllCases,jdbcType=LONGVARCHAR}, #{apiFailureCases,jdbcType=LONGVARCHAR},
|
#{issueList,jdbcType=LONGVARCHAR}, #{apiAllCases,jdbcType=LONGVARCHAR}, #{apiFailureCases,jdbcType=LONGVARCHAR},
|
||||||
#{scenarioAllCases,jdbcType=LONGVARCHAR}, #{scenarioFailureCases,jdbcType=LONGVARCHAR},
|
#{scenarioAllCases,jdbcType=LONGVARCHAR}, #{scenarioFailureCases,jdbcType=LONGVARCHAR},
|
||||||
#{loadAllCases,jdbcType=LONGVARCHAR}, #{loadFailureCases,jdbcType=LONGVARCHAR},
|
#{loadAllCases,jdbcType=LONGVARCHAR}, #{loadFailureCases,jdbcType=LONGVARCHAR},
|
||||||
#{scenarioReportId,jdbcType=LONGVARCHAR}, #{apiCaseReportId,jdbcType=LONGVARCHAR},
|
#{planScenarioReportStruct,jdbcType=LONGVARCHAR}, #{planApiCaseReportStruct,jdbcType=LONGVARCHAR},
|
||||||
#{loadCaseReportId,jdbcType=LONGVARCHAR})
|
#{planLoadCaseReportStruct,jdbcType=LONGVARCHAR})
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestPlanReportContentWithBLOBs">
|
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestPlanReportContentWithBLOBs">
|
||||||
insert into test_plan_report_content
|
insert into test_plan_report_content
|
||||||
|
@ -236,14 +237,14 @@
|
||||||
<if test="loadFailureCases != null">
|
<if test="loadFailureCases != null">
|
||||||
load_failure_cases,
|
load_failure_cases,
|
||||||
</if>
|
</if>
|
||||||
<if test="scenarioReportId != null">
|
<if test="planScenarioReportStruct != null">
|
||||||
scenario_report_id,
|
plan_scenario_report_struct,
|
||||||
</if>
|
</if>
|
||||||
<if test="apiCaseReportId != null">
|
<if test="planApiCaseReportStruct != null">
|
||||||
api_case_report_id,
|
plan_api_case_report_struct,
|
||||||
</if>
|
</if>
|
||||||
<if test="loadCaseReportId != null">
|
<if test="planLoadCaseReportStruct != null">
|
||||||
load_case_report_id,
|
plan_load_case_report_struct,
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
@ -313,14 +314,14 @@
|
||||||
<if test="loadFailureCases != null">
|
<if test="loadFailureCases != null">
|
||||||
#{loadFailureCases,jdbcType=LONGVARCHAR},
|
#{loadFailureCases,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="scenarioReportId != null">
|
<if test="planScenarioReportStruct != null">
|
||||||
#{scenarioReportId,jdbcType=LONGVARCHAR},
|
#{planScenarioReportStruct,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="apiCaseReportId != null">
|
<if test="planApiCaseReportStruct != null">
|
||||||
#{apiCaseReportId,jdbcType=LONGVARCHAR},
|
#{planApiCaseReportStruct,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="loadCaseReportId != null">
|
<if test="planLoadCaseReportStruct != null">
|
||||||
#{loadCaseReportId,jdbcType=LONGVARCHAR},
|
#{planLoadCaseReportStruct,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
@ -399,14 +400,14 @@
|
||||||
<if test="record.loadFailureCases != null">
|
<if test="record.loadFailureCases != null">
|
||||||
load_failure_cases = #{record.loadFailureCases,jdbcType=LONGVARCHAR},
|
load_failure_cases = #{record.loadFailureCases,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.scenarioReportId != null">
|
<if test="record.planScenarioReportStruct != null">
|
||||||
scenario_report_id = #{record.scenarioReportId,jdbcType=LONGVARCHAR},
|
plan_scenario_report_struct = #{record.planScenarioReportStruct,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.apiCaseReportId != null">
|
<if test="record.planApiCaseReportStruct != null">
|
||||||
api_case_report_id = #{record.apiCaseReportId,jdbcType=LONGVARCHAR},
|
plan_api_case_report_struct = #{record.planApiCaseReportStruct,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.loadCaseReportId != null">
|
<if test="record.planLoadCaseReportStruct != null">
|
||||||
load_case_report_id = #{record.loadCaseReportId,jdbcType=LONGVARCHAR},
|
plan_load_case_report_struct = #{record.planLoadCaseReportStruct,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
</set>
|
</set>
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
|
@ -437,9 +438,9 @@
|
||||||
scenario_failure_cases = #{record.scenarioFailureCases,jdbcType=LONGVARCHAR},
|
scenario_failure_cases = #{record.scenarioFailureCases,jdbcType=LONGVARCHAR},
|
||||||
load_all_Cases = #{record.loadAllCases,jdbcType=LONGVARCHAR},
|
load_all_Cases = #{record.loadAllCases,jdbcType=LONGVARCHAR},
|
||||||
load_failure_cases = #{record.loadFailureCases,jdbcType=LONGVARCHAR},
|
load_failure_cases = #{record.loadFailureCases,jdbcType=LONGVARCHAR},
|
||||||
scenario_report_id = #{record.scenarioReportId,jdbcType=LONGVARCHAR},
|
plan_scenario_report_struct = #{record.planScenarioReportStruct,jdbcType=LONGVARCHAR},
|
||||||
api_case_report_id = #{record.apiCaseReportId,jdbcType=LONGVARCHAR},
|
plan_api_case_report_struct = #{record.planApiCaseReportStruct,jdbcType=LONGVARCHAR},
|
||||||
load_case_report_id = #{record.loadCaseReportId,jdbcType=LONGVARCHAR}
|
plan_load_case_report_struct = #{record.planLoadCaseReportStruct,jdbcType=LONGVARCHAR}
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
</if>
|
</if>
|
||||||
|
@ -524,14 +525,14 @@
|
||||||
<if test="loadFailureCases != null">
|
<if test="loadFailureCases != null">
|
||||||
load_failure_cases = #{loadFailureCases,jdbcType=LONGVARCHAR},
|
load_failure_cases = #{loadFailureCases,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="scenarioReportId != null">
|
<if test="planScenarioReportStruct != null">
|
||||||
scenario_report_id = #{scenarioReportId,jdbcType=LONGVARCHAR},
|
plan_scenario_report_struct = #{planScenarioReportStruct,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="apiCaseReportId != null">
|
<if test="planApiCaseReportStruct != null">
|
||||||
api_case_report_id = #{apiCaseReportId,jdbcType=LONGVARCHAR},
|
plan_api_case_report_struct = #{planApiCaseReportStruct,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="loadCaseReportId != null">
|
<if test="planLoadCaseReportStruct != null">
|
||||||
load_case_report_id = #{loadCaseReportId,jdbcType=LONGVARCHAR},
|
plan_load_case_report_struct = #{planLoadCaseReportStruct,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
</set>
|
</set>
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
|
@ -559,9 +560,9 @@
|
||||||
scenario_failure_cases = #{scenarioFailureCases,jdbcType=LONGVARCHAR},
|
scenario_failure_cases = #{scenarioFailureCases,jdbcType=LONGVARCHAR},
|
||||||
load_all_Cases = #{loadAllCases,jdbcType=LONGVARCHAR},
|
load_all_Cases = #{loadAllCases,jdbcType=LONGVARCHAR},
|
||||||
load_failure_cases = #{loadFailureCases,jdbcType=LONGVARCHAR},
|
load_failure_cases = #{loadFailureCases,jdbcType=LONGVARCHAR},
|
||||||
scenario_report_id = #{scenarioReportId,jdbcType=LONGVARCHAR},
|
plan_scenario_report_struct = #{planScenarioReportStruct,jdbcType=LONGVARCHAR},
|
||||||
api_case_report_id = #{apiCaseReportId,jdbcType=LONGVARCHAR},
|
plan_api_case_report_struct = #{planApiCaseReportStruct,jdbcType=LONGVARCHAR},
|
||||||
load_case_report_id = #{loadCaseReportId,jdbcType=LONGVARCHAR}
|
plan_load_case_report_struct = #{planLoadCaseReportStruct,jdbcType=LONGVARCHAR}
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.TestPlanReportContent">
|
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.TestPlanReportContent">
|
||||||
|
|
|
@ -314,9 +314,6 @@ public class TestPlanReportService {
|
||||||
TestPlanSimpleReportDTO reportDTO = testPlanService.buildPlanReport(testPlanReport, reportContent);
|
TestPlanSimpleReportDTO reportDTO = testPlanService.buildPlanReport(testPlanReport, reportContent);
|
||||||
reportDTO.setStartTime(testPlanReport.getStartTime());
|
reportDTO.setStartTime(testPlanReport.getStartTime());
|
||||||
reportContent = parseReportDaoToReportContent(reportDTO, reportContent);
|
reportContent = parseReportDaoToReportContent(reportDTO, reportContent);
|
||||||
testPlanReportContentMapper.updateByPrimaryKeySelective(reportContent);
|
|
||||||
testPlanReportMapper.updateByPrimaryKey(testPlanReport);
|
|
||||||
|
|
||||||
return reportContent;
|
return reportContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -725,7 +722,7 @@ public class TestPlanReportService {
|
||||||
|
|
||||||
private boolean isDynamicallyGenerateReports(TestPlanReportContentWithBLOBs testPlanReportContent) {
|
private boolean isDynamicallyGenerateReports(TestPlanReportContentWithBLOBs testPlanReportContent) {
|
||||||
return testPlanReportContent != null &&
|
return testPlanReportContent != null &&
|
||||||
(StringUtils.isNotEmpty(testPlanReportContent.getApiCaseReportId()) || StringUtils.isNotEmpty(testPlanReportContent.getApiCaseReportId()) || StringUtils.isNotEmpty(testPlanReportContent.getApiCaseReportId()));
|
(StringUtils.isNotEmpty(testPlanReportContent.getPlanApiCaseReportStruct()) || StringUtils.isNotEmpty(testPlanReportContent.getPlanScenarioReportStruct()) || StringUtils.isNotEmpty(testPlanReportContent.getPlanLoadCaseReportStruct()));
|
||||||
}
|
}
|
||||||
|
|
||||||
private TestPlanReportContentWithBLOBs dynamicallyGenerateReports(TestPlanReportContentWithBLOBs testPlanReportContent) {
|
private TestPlanReportContentWithBLOBs dynamicallyGenerateReports(TestPlanReportContentWithBLOBs testPlanReportContent) {
|
||||||
|
@ -740,16 +737,16 @@ public class TestPlanReportService {
|
||||||
content.setId(testPlanReportContentId);
|
content.setId(testPlanReportContentId);
|
||||||
|
|
||||||
if (MapUtils.isNotEmpty(apiCaseReportMap)) {
|
if (MapUtils.isNotEmpty(apiCaseReportMap)) {
|
||||||
content.setApiCaseReportId(JSONObject.toJSONString(apiCaseReportMap));
|
content.setPlanApiCaseReportStruct(JSONObject.toJSONString(apiCaseReportMap));
|
||||||
}
|
}
|
||||||
if (MapUtils.isNotEmpty(scenarioReportIdMap)) {
|
if (MapUtils.isNotEmpty(scenarioReportIdMap)) {
|
||||||
content.setScenarioReportId(JSONObject.toJSONString(scenarioReportIdMap));
|
content.setPlanScenarioReportStruct(JSONObject.toJSONString(scenarioReportIdMap));
|
||||||
}
|
}
|
||||||
if (MapUtils.isNotEmpty(loadCaseReportIdMap)) {
|
if (MapUtils.isNotEmpty(loadCaseReportIdMap)) {
|
||||||
content.setLoadCaseReportId(JSONObject.toJSONString(loadCaseReportIdMap));
|
content.setPlanLoadCaseReportStruct(JSONObject.toJSONString(loadCaseReportIdMap));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StringUtils.isNotEmpty(content.getApiCaseReportId()) || StringUtils.isNotEmpty(content.getScenarioReportId()) || StringUtils.isNotEmpty(content.getLoadCaseReportId())) {
|
if (StringUtils.isNotEmpty(content.getPlanApiCaseReportStruct()) || StringUtils.isNotEmpty(content.getPlanScenarioReportStruct()) || StringUtils.isNotEmpty(content.getPlanLoadCaseReportStruct())) {
|
||||||
testPlanReportContentMapper.updateByPrimaryKeySelective(content);
|
testPlanReportContentMapper.updateByPrimaryKeySelective(content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -761,21 +758,21 @@ public class TestPlanReportService {
|
||||||
Map<String, String> testPlanLoadCaseIdAndReportIdMap = new HashMap<>();
|
Map<String, String> testPlanLoadCaseIdAndReportIdMap = new HashMap<>();
|
||||||
|
|
||||||
if (testPlanReportContentWithBLOBs != null) {
|
if (testPlanReportContentWithBLOBs != null) {
|
||||||
if (StringUtils.isNotEmpty(testPlanReportContentWithBLOBs.getApiCaseReportId())) {
|
if (StringUtils.isNotEmpty(testPlanReportContentWithBLOBs.getPlanApiCaseReportStruct())) {
|
||||||
try {
|
try {
|
||||||
testPlanApiCaseIdAndReportIdMap = JSONObject.parseObject(testPlanReportContentWithBLOBs.getApiCaseReportId(), Map.class);
|
testPlanApiCaseIdAndReportIdMap = JSONObject.parseObject(testPlanReportContentWithBLOBs.getPlanApiCaseReportStruct(), Map.class);
|
||||||
} catch (Exception ignore) {
|
} catch (Exception ignore) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotEmpty(testPlanReportContentWithBLOBs.getScenarioReportId())) {
|
if (StringUtils.isNotEmpty(testPlanReportContentWithBLOBs.getPlanScenarioReportStruct())) {
|
||||||
try {
|
try {
|
||||||
testPlanScenarioIdAndReportIdMap = JSONObject.parseObject(testPlanReportContentWithBLOBs.getScenarioReportId(), Map.class);
|
testPlanScenarioIdAndReportIdMap = JSONObject.parseObject(testPlanReportContentWithBLOBs.getPlanScenarioReportStruct(), Map.class);
|
||||||
} catch (Exception ignore) {
|
} catch (Exception ignore) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotEmpty(testPlanReportContentWithBLOBs.getLoadCaseReportId())) {
|
if (StringUtils.isNotEmpty(testPlanReportContentWithBLOBs.getPlanLoadCaseReportStruct())) {
|
||||||
try {
|
try {
|
||||||
testPlanLoadCaseIdAndReportIdMap = JSONObject.parseObject(testPlanReportContentWithBLOBs.getLoadCaseReportId(), Map.class);
|
testPlanLoadCaseIdAndReportIdMap = JSONObject.parseObject(testPlanReportContentWithBLOBs.getPlanLoadCaseReportStruct(), Map.class);
|
||||||
} catch (Exception ignore) {
|
} catch (Exception ignore) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
ALTER TABLE test_plan_report_content ADD scenario_report_id longtext NULL;
|
ALTER TABLE test_plan_report_content ADD plan_scenario_report_struct longtext NULL;
|
||||||
ALTER TABLE test_plan_report_content ADD api_case_report_id longtext NULL;
|
ALTER TABLE test_plan_report_content ADD plan_api_case_report_struct longtext NULL;
|
||||||
ALTER TABLE test_plan_report_content ADD load_case_report_id longtext NULL;
|
ALTER TABLE test_plan_report_content ADD plan_load_case_report_struct longtext NULL;
|
Loading…
Reference in New Issue