fix(测试跟踪): 测试计划保存报告内容时不赋开始时间和结束时间

--bug=1021241 --user=宋天阳 【测试跟踪】测试计划-报告统计-保存-运行耗时统计异常
https://www.tapd.cn/55049933/s/1319553
This commit is contained in:
song-tianyang 2022-12-26 18:19:37 +08:00 committed by wxg0103
parent 5a39c4919a
commit a502c28108
1 changed files with 4 additions and 8 deletions

View File

@ -385,12 +385,6 @@ public class TestPlanReportService {
TestPlanReportContentWithBLOBs testPlanReportContent = new TestPlanReportContentWithBLOBs();
testPlanReportContent.setId(UUID.randomUUID().toString());
testPlanReportContent.setTestPlanReportId(returnDTO.getTestPlanReport().getId());
if (testPlanReportContent.getStartTime() == null) {
testPlanReportContent.setStartTime(System.currentTimeMillis());
}
if (testPlanReportContent.getEndTime() == null) {
testPlanReportContent.setEndTime(System.currentTimeMillis());
}
testPlanReportContentMapper.insert(testPlanReportContent);
}
@ -649,8 +643,10 @@ public class TestPlanReportService {
TestPlanReportContentWithBLOBs testPlanReportContent = null;
TestPlanSimpleReportDTO reportDTO = testPlanService.buildPlanReport(testPlan.getId(), false);
if (!testPlanReportContentList.isEmpty()) {
testPlanReportContent = testPlanReportContentList.get(0);
testPlanReportContentMapper.updateByPrimaryKeySelective(parseReportDaoToReportContent(reportDTO, testPlanReportContent));
testPlanReportContent = parseReportDaoToReportContent(reportDTO, testPlanReportContentList.get(0));
testPlanReportContent.setStartTime(null);
testPlanReportContent.setEndTime(null);
testPlanReportContentMapper.updateByPrimaryKeySelective(testPlanReportContent);
}
if (reportDTO.getStartTime() == null) {