From b85c7d49c212a9c4b20b3c0df9762af0afdc1fab Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Mon, 14 Nov 2022 13:41:41 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E9=80=9A=E7=9F=A5=E7=9A=84actualStartTime=E4=B8=8D?= =?UTF-8?q?=E6=98=AF=E6=8A=A5=E5=91=8A=E5=BC=80=E5=A7=8B=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E7=9A=84=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1019386 --user=王孝刚 定时任务消息知道的actualStartTime和actualEndTime变量建议和报告的开始结束时间一致 https://www.tapd.cn/55049933/s/1295324 --- .../java/io/metersphere/plan/service/TestPlanService.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanService.java b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanService.java index de538fc794..91729c0b0c 100644 --- a/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanService.java +++ b/test-track/backend/src/main/java/io/metersphere/plan/service/TestPlanService.java @@ -842,6 +842,13 @@ public class TestPlanService { this.verifyPool(projectId, runModeConfig); //创建测试报告,然后返回的ID重新赋值为resourceID,作为后续的参数 TestPlanScheduleReportInfoDTO reportInfoDTO = this.genTestPlanReport(planReportId, testPlanId, userId, triggerMode, runModeConfig); + //定时任务执行重新设置实际开始时间 + if (StringUtils.equals(triggerMode, TriggerMode.SCHEDULE.name())) { + TestPlanWithBLOBs testPlanWithBLOBs = new TestPlanWithBLOBs(); + testPlanWithBLOBs.setId(testPlanId); + testPlanWithBLOBs.setActualStartTime(System.currentTimeMillis()); + testPlanMapper.updateByPrimaryKeySelective(testPlanWithBLOBs); + } //测试计划准备执行,取消测试计划的实际结束时间 extTestPlanMapper.updateActualEndTimeIsNullById(testPlanId);